diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 4eb006860d6..64c2e9beabd 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -383,7 +383,7 @@ public: #if 0 // This code could have quadratic runtime. if (!is_built()) { - std::vector::iterator pi = std::find(pts.begin(), pts.end(), p); + std::vector::iterator pi = std::find_if(pts.begin(), pts.end(), equal_to_p); // Precondition: the point must be there. CGAL_assertion (pi != pts.end()); pts.erase(pi);