diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 16e355c20e4..16e9918519e 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -128,6 +128,8 @@ public: typedef typename Tds::Halfedge_iterator All_halfedges_iterator; typedef typename Tds::Vertex_iterator All_vertices_iterator; + typedef typename Gt::Construct_point_2 Construct_point_2; + class Perturbation_order { const Self *t; @@ -277,7 +279,9 @@ public: Face_handle &fr) const; // GEOMETRIC FEATURES AND CONSTRUCTION - Point_2 construct_point(const Point& p) const; + typename boost::result_of::type + construct_point(const Point& p) const { return geom_traits().construct_point_2_object()(p); } + const Point& point(Face_handle c, int i) const; const Point& point(Vertex_handle v) const; Segment segment(Face_handle f, int i) const; @@ -595,7 +599,6 @@ std::ptrdiff_t insert(InputIterator first, InputIterator last) std::vector points (first, last); - typedef typename Geom_traits::Construct_point_2 Construct_point_2; typedef typename boost::result_of::type Ret; typedef CGAL::internal::boost_::function_property_map fpmap; typedef CGAL::Spatial_sort_traits_adapter_2 Search_traits_2; @@ -967,14 +970,6 @@ is_face(Vertex_handle v1, return _tds.is_face(v1, v2, v3, fr); } -template -typename Triangulation_2::Point_2 -Triangulation_2:: -construct_point(const Point& p) const -{ - return geom_traits().construct_point_2_object()(p); -} - template const typename Triangulation_2::Point& Triangulation_2:: diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 2e3771adad4..ebe2a7de594 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -433,6 +433,8 @@ public: typedef typename Tds::Simplex Simplex; + typedef typename GT::Construct_point_3 Construct_point_3; + private: // This class is used to generate the Finite_*_iterators. class Infinite_tester @@ -553,7 +555,8 @@ protected: public: template // Point or Point_3 - Point_3 construct_point(const P& p) const + typename boost::result_of::type + construct_point(const P& p) const { return geom_traits().construct_point_3_object()(p); } @@ -1127,7 +1130,6 @@ public: // Nevertheless, to make it more generic (that is, allowing the user to pass // a `Point` type that is not GT::Point_3), we still use the spatial sort // adapter traits and Construct_point_3 here. - typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename boost::result_of::type Ret; typedef CGAL::internal::boost_::function_property_map fpmap; typedef CGAL::Spatial_sort_traits_adapter_3 Search_traits_3;