astrorama / SourceXtractorPlusPlus

SourceXtractor++, the next generation SExtractor
https://astrorama.github.io/SourceXtractorPlusPlus/
GNU Lesser General Public License v3.0
72 stars 9 forks source link

Fix build on macos (clang) #420

Closed ayllon closed 2 years ago

ayllon commented 2 years ago

I have managed to build onnxruntime for mac, so the code that requires ONNX is now built on mac too. However, clang seems to disambiguate the lines I have modified in the model fitting config as function declarations, not as constructors. This fixes this.

Btw, were you using py::extract<const char*> instead of std::string for any particular reason? It also complains unless I use py::extract<std::string> (which works in other places of our code, as for the exceptions)

ayllon commented 2 years ago

I hope the fedora 35 docker image gets in a proper condition at some point 😞

marcschefer commented 2 years ago

Btw, were you using py::extract<const char*> instead of std::string for any particular reason? It also complains unless I use py::extract<std::string> (which works in other places of our code, as for the exceptions)

If it works with std::string it's probably better.