Changed from boost::function_property_map to CGAL::internal::boost_'s

This is so it's always available, even if using an old version of boost
This commit is contained in:
Mael Rouxel-Labbé 2017-06-22 17:46:53 +02:00
parent a931a03094
commit 8c7bda5f2d
7 changed files with 34 additions and 30 deletions

View File

@ -4,9 +4,10 @@
#include <CGAL/Regular_triangulation_2.h> #include <CGAL/Regular_triangulation_2.h>
#include <CGAL/boost/graph/graph_traits_Regular_triangulation_2.h> #include <CGAL/boost/graph/graph_traits_Regular_triangulation_2.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/filtered_graph.hpp> #include <boost/graph/filtered_graph.hpp>
#include <boost/property_map/function_property_map.hpp>
#include <fstream> #include <fstream>
@ -103,7 +104,7 @@ main(int argc,char* argv[])
boost::kruskal_minimum_spanning_tree( boost::kruskal_minimum_spanning_tree(
ft, std::back_inserter(mst), ft, std::back_inserter(mst),
vertex_index_map(vertex_index_pmap). vertex_index_map(vertex_index_pmap).
weight_map(boost::make_function_property_map< weight_map(CGAL::internal::boost_::make_function_property_map<
edge_descriptor, FT, Edge_weight_functor>(Edge_weight_functor(t)))); edge_descriptor, FT, Edge_weight_functor>(Edge_weight_functor(t))));
std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl; std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl;

View File

@ -22,14 +22,15 @@
#include <CGAL/Triangulation_2.h> #include <CGAL/Triangulation_2.h>
#include <CGAL/Regular_triangulation_face_base_2.h> #include <CGAL/Regular_triangulation_face_base_2.h>
#include <CGAL/Regular_triangulation_vertex_base_2.h> #include <CGAL/Regular_triangulation_vertex_base_2.h>
#include <CGAL/utility.h> #include <CGAL/utility.h>
#include <CGAL/Object.h> #include <CGAL/Object.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <CGAL/internal/Has_nested_type_Bare_point.h> #include <CGAL/internal/Has_nested_type_Bare_point.h>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/mpl/identity.hpp> #include <boost/mpl/identity.hpp>
#include <boost/property_map/function_property_map.hpp>
#include <boost/utility/result_of.hpp> #include <boost/utility/result_of.hpp>
#ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
@ -398,12 +399,12 @@ public:
// spatial sorting must use bare points, so we need an adapter // spatial sorting must use bare points, so we need an adapter
typedef typename Geom_traits::Construct_point_2 Construct_point_2; typedef typename Geom_traits::Construct_point_2 Construct_point_2;
typedef typename boost::result_of<const Construct_point_2(const Weighted_point&)>::type Ret; typedef typename boost::result_of<const Construct_point_2(const Weighted_point&)>::type Ret;
typedef boost::function_property_map<Construct_point_2, Weighted_point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_2, Weighted_point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2; typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_2( Search_traits_2(
boost::make_function_property_map<Weighted_point, Ret, Construct_point_2>( CGAL::internal::boost_::make_function_property_map<Weighted_point, Ret, Construct_point_2>(
geom_traits().construct_point_2_object()), geom_traits())); geom_traits().construct_point_2_object()), geom_traits()));
Face_handle hint; Face_handle hint;
@ -465,13 +466,13 @@ private:
typedef Index_to_Bare_point<Construct_point_2, typedef Index_to_Bare_point<Construct_point_2,
std::vector<Weighted_point> > Access_bare_point; std::vector<Weighted_point> > Access_bare_point;
typedef typename boost::result_of<const Construct_point_2(const Weighted_point&)>::type Ret; typedef typename boost::result_of<const Construct_point_2(const Weighted_point&)>::type Ret;
typedef boost::function_property_map<Access_bare_point, std::size_t, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Access_bare_point, std::size_t, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_2<Gt, fpmap> Search_traits_2; typedef CGAL::Spatial_sort_traits_adapter_2<Gt, fpmap> Search_traits_2;
Access_bare_point accessor(points, geom_traits().construct_point_2_object()); Access_bare_point accessor(points, geom_traits().construct_point_2_object());
spatial_sort(indices.begin(), indices.end(), spatial_sort(indices.begin(), indices.end(),
Search_traits_2( Search_traits_2(
boost::make_function_property_map< CGAL::internal::boost_::make_function_property_map<
std::size_t, Ret, Access_bare_point>(accessor), std::size_t, Ret, Access_bare_point>(accessor),
geom_traits())); geom_traits()));

View File

@ -40,12 +40,13 @@
#include <CGAL/Spatial_sort_traits_adapter_2.h> #include <CGAL/Spatial_sort_traits_adapter_2.h>
#include <CGAL/double.h> #include <CGAL/double.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <boost/utility/result_of.hpp> #include <boost/utility/result_of.hpp>
#include <boost/random/linear_congruential.hpp> #include <boost/random/linear_congruential.hpp>
#include <boost/random/uniform_smallint.hpp> #include <boost/random/uniform_smallint.hpp>
#include <boost/random/variate_generator.hpp> #include <boost/random/variate_generator.hpp>
#include <boost/iterator/transform_iterator.hpp> #include <boost/iterator/transform_iterator.hpp>
#include <boost/property_map/function_property_map.hpp>
#ifndef CGAL_NO_STRUCTURAL_FILTERING #ifndef CGAL_NO_STRUCTURAL_FILTERING
#include <CGAL/internal/Static_filters/tools.h> #include <CGAL/internal/Static_filters/tools.h>
@ -585,12 +586,12 @@ std::ptrdiff_t insert(InputIterator first, InputIterator last)
typedef typename Geom_traits::Construct_point_2 Construct_point_2; typedef typename Geom_traits::Construct_point_2 Construct_point_2;
typedef typename boost::result_of<const Construct_point_2(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_2(const Point&)>::type Ret;
typedef boost::function_property_map<Construct_point_2, Point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_2, Point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2; typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_2( Search_traits_2(
boost::make_function_property_map<Point, Ret, Construct_point_2>( CGAL::internal::boost_::make_function_property_map<Point, Ret, Construct_point_2>(
geom_traits().construct_point_2_object()), geom_traits())); geom_traits().construct_point_2_object()), geom_traits()));
Face_handle f; Face_handle f;

View File

@ -33,10 +33,10 @@
#include <CGAL/Spatial_sort_traits_adapter_2.h> #include <CGAL/Spatial_sort_traits_adapter_2.h>
#include <map> #include <map>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <boost/mpl/identity.hpp> #include <boost/mpl/identity.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/property_map/function_property_map.hpp>
#include <boost/random/linear_congruential.hpp> #include <boost/random/linear_congruential.hpp>
#include <boost/random/geometric_distribution.hpp> #include <boost/random/geometric_distribution.hpp>
#include <boost/random/variate_generator.hpp> #include <boost/random/variate_generator.hpp>
@ -131,12 +131,12 @@ public:
// Spatial sort can only be used with Gt::Point_2: we need an adapter // Spatial sort can only be used with Gt::Point_2: we need an adapter
typedef typename Geom_traits::Construct_point_2 Construct_point_2; typedef typename Geom_traits::Construct_point_2 Construct_point_2;
typedef typename boost::result_of<const Construct_point_2(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_2(const Point&)>::type Ret;
typedef boost::function_property_map<Construct_point_2, Point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_2, Point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2; typedef CGAL::Spatial_sort_traits_adapter_2<Geom_traits, fpmap> Search_traits_2;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_2( Search_traits_2(
boost::make_function_property_map<Point, Ret, Construct_point_2>( CGAL::internal::boost_::make_function_property_map<Point, Ret, Construct_point_2>(
geom_traits().construct_point_2_object()), geom_traits())); geom_traits().construct_point_2_object()), geom_traits()));
// hints[i] is the face of the previously inserted point in level i. // hints[i] is the face of the previously inserted point in level i.

View File

@ -33,7 +33,6 @@
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/mpl/identity.hpp> #include <boost/mpl/identity.hpp>
#include <boost/property_map/function_property_map.hpp>
#include <boost/utility/result_of.hpp> #include <boost/utility/result_of.hpp>
#ifdef CGAL_LINKED_WITH_TBB #ifdef CGAL_LINKED_WITH_TBB
@ -47,6 +46,7 @@
#include <CGAL/Regular_triangulation_vertex_base_3.h> #include <CGAL/Regular_triangulation_vertex_base_3.h>
#include <CGAL/Regular_triangulation_cell_base_3.h> #include <CGAL/Regular_triangulation_cell_base_3.h>
#include <CGAL/internal/Has_nested_type_Bare_point.h> #include <CGAL/internal/Has_nested_type_Bare_point.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Cartesian_converter.h> #include <CGAL/Cartesian_converter.h>
@ -258,12 +258,12 @@ namespace CGAL {
// Spatial sorting can only be applied to bare points, so we need an adaptor // Spatial sorting can only be applied to bare points, so we need an adaptor
typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3;
typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret;
typedef boost::function_property_map<Construct_point_3, Weighted_point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_3, Weighted_point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
spatial_sort(points_on_far_sphere.begin(), points_on_far_sphere.end(), spatial_sort(points_on_far_sphere.begin(), points_on_far_sphere.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map<Weighted_point, Ret, Construct_point_3>( CGAL::internal::boost_::make_function_property_map<Weighted_point, Ret, Construct_point_3>(
geom_traits().construct_point_3_object()), geom_traits())); geom_traits().construct_point_3_object()), geom_traits()));
typename std::vector<Weighted_point>::const_iterator it_p = typename std::vector<Weighted_point>::const_iterator it_p =
@ -336,12 +336,12 @@ namespace CGAL {
// kernel creates temporaries and prevent it. // kernel creates temporaries and prevent it.
typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3;
typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret;
typedef boost::function_property_map<Construct_point_3, Weighted_point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_3, Weighted_point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map<Weighted_point, Ret, Construct_point_3>( CGAL::internal::boost_::make_function_property_map<Weighted_point, Ret, Construct_point_3>(
geom_traits().construct_point_3_object()), geom_traits())); geom_traits().construct_point_3_object()), geom_traits()));
// Parallel // Parallel
@ -458,13 +458,13 @@ namespace CGAL {
typedef Index_to_Bare_point<Construct_point_3, typedef Index_to_Bare_point<Construct_point_3,
std::vector<Weighted_point> > Access_bare_point; std::vector<Weighted_point> > Access_bare_point;
typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Weighted_point&)>::type Ret;
typedef boost::function_property_map<Access_bare_point, std::size_t, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Access_bare_point, std::size_t, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Gt, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Gt, fpmap> Search_traits_3;
Access_bare_point accessor(points, geom_traits().construct_point_3_object()); Access_bare_point accessor(points, geom_traits().construct_point_3_object());
spatial_sort(indices.begin(), indices.end(), spatial_sort(indices.begin(), indices.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map< CGAL::internal::boost_::make_function_property_map<
std::size_t, Ret, Access_bare_point>(accessor), std::size_t, Ret, Access_bare_point>(accessor),
geom_traits())); geom_traits()));

View File

@ -54,6 +54,7 @@
#include <CGAL/function_objects.h> #include <CGAL/function_objects.h>
#include <CGAL/Iterator_project.h> #include <CGAL/Iterator_project.h>
#include <CGAL/Default.h> #include <CGAL/Default.h>
#include <CGAL/internal/boost/function_property_map.hpp>
#include <CGAL/Bbox_3.h> #include <CGAL/Bbox_3.h>
#include <CGAL/Spatial_lock_grid_3.h> #include <CGAL/Spatial_lock_grid_3.h>
@ -63,7 +64,6 @@
#include <boost/random/uniform_smallint.hpp> #include <boost/random/uniform_smallint.hpp>
#include <boost/random/variate_generator.hpp> #include <boost/random/variate_generator.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/property_map/function_property_map.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <boost/utility/result_of.hpp> #include <boost/utility/result_of.hpp>
@ -1153,12 +1153,12 @@ public:
// adapter traits and Construct_point_3 here. // adapter traits and Construct_point_3 here.
typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3;
typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret;
typedef boost::function_property_map<Construct_point_3, Point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_3, Point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map<Point, Ret, Construct_point_3>( CGAL::internal::boost_::make_function_property_map<Point, Ret, Construct_point_3>(
geom_traits().construct_point_3_object()), geom_traits())); geom_traits().construct_point_3_object()), geom_traits()));
Vertex_handle hint; Vertex_handle hint;
@ -6204,12 +6204,12 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover &rem
// Spatial sorting can only be applied to bare points, so we need an adaptor // Spatial sorting can only be applied to bare points, so we need an adaptor
typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3;
typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret;
typedef boost::function_property_map<Construct_point_3, Point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_3, Point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
spatial_sort(vps.begin(), vps.end(), spatial_sort(vps.begin(), vps.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map<Point, Ret, Construct_point_3>( CGAL::internal::boost_::make_function_property_map<Point, Ret, Construct_point_3>(
geom_traits().construct_point_3_object()), geom_traits())); geom_traits().construct_point_3_object()), geom_traits()));
std::size_t svps = vps.size(); std::size_t svps = vps.size();

View File

@ -32,7 +32,8 @@
#include <CGAL/Triangulation_hierarchy_vertex_base_3.h> #include <CGAL/Triangulation_hierarchy_vertex_base_3.h>
#include <CGAL/Location_policy.h> #include <CGAL/Location_policy.h>
#include <boost/property_map/function_property_map.hpp> #include <CGAL/internal/boost/function_property_map.hpp>
#include <boost/random/linear_congruential.hpp> #include <boost/random/linear_congruential.hpp>
#include <boost/random/geometric_distribution.hpp> #include <boost/random/geometric_distribution.hpp>
#include <boost/random/variate_generator.hpp> #include <boost/random/variate_generator.hpp>
@ -172,12 +173,12 @@ public:
// Spatial sort can only be used with Geom_traits::Point_3: we need an adapter // Spatial sort can only be used with Geom_traits::Point_3: we need an adapter
typedef typename Geom_traits::Construct_point_3 Construct_point_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3;
typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret;
typedef boost::function_property_map<Construct_point_3, Point, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Construct_point_3, Point, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
spatial_sort(points.begin(), points.end(), spatial_sort(points.begin(), points.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map<Point, Ret, Construct_point_3>( CGAL::internal::boost_::make_function_property_map<Point, Ret, Construct_point_3>(
geom_traits().construct_point_3_object()), geom_traits())); geom_traits().construct_point_3_object()), geom_traits()));
// hints[i] is the vertex of the previously inserted point in level i. // hints[i] is the vertex of the previously inserted point in level i.
@ -249,13 +250,13 @@ private:
typedef Index_to_Bare_point<Construct_point_3, typedef Index_to_Bare_point<Construct_point_3,
std::vector<Point> > Access_bare_point; std::vector<Point> > Access_bare_point;
typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret; typedef typename boost::result_of<const Construct_point_3(const Point&)>::type Ret;
typedef boost::function_property_map<Access_bare_point, std::size_t, Ret> fpmap; typedef CGAL::internal::boost_::function_property_map<Access_bare_point, std::size_t, Ret> fpmap;
typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3; typedef CGAL::Spatial_sort_traits_adapter_3<Geom_traits, fpmap> Search_traits_3;
Access_bare_point accessor(points, geom_traits().construct_point_3_object()); Access_bare_point accessor(points, geom_traits().construct_point_3_object());
spatial_sort(indices.begin(), indices.end(), spatial_sort(indices.begin(), indices.end(),
Search_traits_3( Search_traits_3(
boost::make_function_property_map< CGAL::internal::boost_::make_function_property_map<
std::size_t, Ret, Access_bare_point>(accessor), std::size_t, Ret, Access_bare_point>(accessor),
geom_traits())); geom_traits()));