tzaeschke / phtree-cpp

PH-Tree C++ implementation
Apache License 2.0
28 stars 9 forks source link

FilterSphere broken #27

Closed tzaeschke closed 2 years ago

tzaeschke commented 2 years ago

FilterSphere doesn't compile when used with floating point coordinates:

    PhTreeD<3, int> tree;
    auto filter1 = FilterSphere({1., 2., 3.}, 1.0, tree.converter());

results in

phtree/common/filter.h:244:36: error: no matching function for call to 'clamp'
            closest_in_bounds[i] = std::clamp(center_internal_[i], lo, hi);
                                   ^~~~~~~~~~

Using clang 11.0.1