Fix python binding

This commit is contained in:
Thomas Krijnen
2025-03-14 10:20:22 +01:00
parent df6b7a34f7
commit 10682fb226
9 changed files with 89 additions and 32 deletions
+2 -2
View File
@@ -36,7 +36,7 @@
// of our typemap. So the attribute conversion block
// is wrapped in a try-catch block manually.
try {
$result = $1.array_->apply_visitor([](auto& v){
$result = $1.apply_visitor([](const auto& v){
using U = std::decay_t<decltype(v)>;
if constexpr (is_std_vector_v<U>) {
return pythonize_vector(v);
@@ -58,7 +58,7 @@
} else {
return pythonize(v);
}
}, $1.index_);
});
} catch(IfcParse::IfcException& e) {
SWIG_exception(SWIG_RuntimeError, e.what());
} catch(...) {