nanoflann icon indicating copy to clipboard operation
nanoflann copied to clipboard

Conflicts with multiple versions of nanoflann

Open teub opened this issue 9 months ago • 3 comments

I spent some time debugging an access violation, only to find out the executable wasn't instantiating the correct classes for nanoflann. Due to how c++ seems to work, the same template class could be defined at different places and there's no compiler error of any sort.

Anyway, long story short : could there be some define to specify a namespace and allow two versions of nanoflann to exist in the same program ? Of course I tried to do namespace something { #include "nanoflann.hpp" } and it doesn't work for various reasons.

Also to preemptively answer why there are 2 different versions in my program : one of them comes from another 3rd party static library, which I'd rather not change.

Thoughts ?

teub avatar Oct 04 '23 14:10 teub