diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 5f39d07b111..60fc8e30852 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -220,22 +220,22 @@ public: Orthtree(const Orthtree& other) : m_traits(other.m_traits), m_node_properties(other.m_node_properties), - m_node_contents(m_node_properties.get_property("contents")), - m_node_depths(m_node_properties.get_property("depths")), - m_node_coordinates(m_node_properties.get_property("coordinates")), - m_node_parents(m_node_properties.get_property>("parents")), - m_node_children(m_node_properties.get_property>("children")), + m_node_contents(m_node_properties.template get_property("contents")), + m_node_depths(m_node_properties.template get_property("depths")), + m_node_coordinates(m_node_properties.template get_property("coordinates")), + m_node_parents(m_node_properties.template get_property>("parents")), + m_node_children(m_node_properties.template get_property>("children")), m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth) {} // move constructor Orthtree(Orthtree&& other) : m_traits(other.m_traits), m_node_properties(std::move(other.m_node_properties)), - m_node_contents(m_node_properties.get_property("contents")), - m_node_depths(m_node_properties.get_property("depths")), - m_node_coordinates(m_node_properties.get_property("coordinates")), - m_node_parents(m_node_properties.get_property>("parents")), - m_node_children(m_node_properties.get_property>("children")), + m_node_contents(m_node_properties.template get_property("contents")), + m_node_depths(m_node_properties.template get_property("depths")), + m_node_coordinates(m_node_properties.template get_property("coordinates")), + m_node_parents(m_node_properties.template get_property>("parents")), + m_node_children(m_node_properties.template get_property>("children")), m_bbox(other.m_bbox), m_side_per_depth(other.m_side_per_depth) { // todo: makes sure moved-from is still valid. Maybe this shouldn't be necessary. @@ -482,7 +482,7 @@ public: template std::pair, bool> get_or_add_node_property(const std::string& name, const T default_value = T()) { - auto p = m_node_properties.get_or_add_property(name, default_value); + auto p = m_node_properties.template get_or_add_property(name, default_value); return std::pair, bool>(Property_map(p.first), p.second); } @@ -498,7 +498,7 @@ public: */ template Property_map add_node_property(const std::string& name, const T default_value = T()) { - return m_node_properties.add_property(name, default_value); + return m_node_properties.template add_property(name, default_value); } /*! @@ -514,7 +514,7 @@ public: */ template Property_map get_node_property(const std::string& name) { - return m_node_properties.get_property(name); + return m_node_properties.template get_property(name); } /*! @@ -529,7 +529,7 @@ public: template std::optional> get_node_property_if_exists(const std::string& name) { - auto p = m_node_properties.get_property_if_exists(name); + auto p = m_node_properties.template get_property_if_exists(name); if (p) return std::optional >(Property_map(*p)); else diff --git a/Orthtree/include/CGAL/Orthtree/Traversals.h b/Orthtree/include/CGAL/Orthtree/Traversals.h index 41c0b501043..f2a8ad6af37 100644 --- a/Orthtree/include/CGAL/Orthtree/Traversals.h +++ b/Orthtree/include/CGAL/Orthtree/Traversals.h @@ -38,13 +38,13 @@ template struct Preorder_traversal { private: - const Orthtree& m_orthtree; + const CGAL::Orthtree& m_orthtree; public: using Node_index = typename GeomTraits::Node_index; - Preorder_traversal(const Orthtree& orthtree) : m_orthtree(orthtree) {} + Preorder_traversal(const CGAL::Orthtree& orthtree) : m_orthtree(orthtree) {} Node_index first_index() const { return m_orthtree.root(); @@ -82,13 +82,13 @@ template struct Postorder_traversal { private: - const Orthtree& m_orthtree; + const CGAL::Orthtree& m_orthtree; public: using Node_index = typename GeomTraits::Node_index; - Postorder_traversal(const Orthtree& orthtree) : m_orthtree(orthtree) {} + Postorder_traversal(const CGAL::Orthtree& orthtree) : m_orthtree(orthtree) {} Node_index first_index() const { return m_orthtree.deepest_first_child(m_orthtree.root()); @@ -113,13 +113,13 @@ template struct Leaves_traversal { private: - const Orthtree& m_orthtree; + const CGAL::Orthtree& m_orthtree; public: using Node_index = typename GeomTraits::Node_index; - Leaves_traversal(const Orthtree& orthtree) : m_orthtree(orthtree) {} + Leaves_traversal(const CGAL::Orthtree& orthtree) : m_orthtree(orthtree) {} Node_index first_index() const { return m_orthtree.deepest_first_child(m_orthtree.root()); @@ -153,7 +153,7 @@ template struct Level_traversal { private: - const Orthtree& m_orthtree; + const CGAL::Orthtree& m_orthtree; const std::size_t m_depth; public: @@ -163,7 +163,7 @@ public: /*! constructs a `depth`-level traversal. */ - Level_traversal(const Orthtree& orthtree, std::size_t depth) : m_orthtree(orthtree), m_depth(depth) {} + Level_traversal(const CGAL::Orthtree& orthtree, std::size_t depth) : m_orthtree(orthtree), m_depth(depth) {} Node_index first_index() const { // assumes the tree has at least one child at m_depth diff --git a/Orthtree/include/CGAL/Orthtree_traits_point.h b/Orthtree/include/CGAL/Orthtree_traits_point.h index b8f436f11c6..299a9c9edb3 100644 --- a/Orthtree/include/CGAL/Orthtree_traits_point.h +++ b/Orthtree/include/CGAL/Orthtree_traits_point.h @@ -150,7 +150,7 @@ public: } auto get_squared_distance_of_element_object() const { - return [&](const Node_data_element& index, const Point_d& point) -> typename FT { + return [&](const Node_data_element& index, const typename Self::Point_d& point) -> typename FT { return CGAL::squared_distance(get(m_point_map, index), point); }; }