Skip to content

Conflicts with multiple versions of nanoflann #212

@teub

Description

@teub

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions