diff --git a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h index f644ac13676..d6e9574fd87 100644 --- a/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h +++ b/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h @@ -475,25 +475,19 @@ void reserve(HalfedgeDS_default& p, }// namespace CGAL namespace boost { -// property_map dispatcher into Polyhedron -template -struct property_map, Tag> -{ - typedef typename CGAL::HDS_property_map:: - template bind_ map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; +#define CGAL_PM_SPECIALIZATION(TAG) \ +template \ +struct property_map, TAG> \ +{\ + typedef typename CGAL::HDS_property_map:: \ + template bind_ map_gen; \ + typedef typename map_gen::type type; \ + typedef typename map_gen::const_type const_type; \ }; -// property_map dispatcher into const Polyhedron -template -struct property_map, Tag> -{ - typedef typename CGAL::HDS_property_map:: - template bind_ map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; -}; +CGAL_PM_SPECIALIZATION(vertex_point_t) + +#undef CGAL_PM_SPECIALIZATION } // namespace boost diff --git a/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h b/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h index 6bad3c9aa0c..c95d50f470d 100644 --- a/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h +++ b/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h @@ -239,23 +239,31 @@ struct T2_property_map // overloads and specializations in the boost namespace namespace boost { -// g++ 'enumeral_type' in template unification not implemented workaround -template -struct property_map -{ - typedef typename CGAL::internal::T2_property_map map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; +#define CGAL_PM_SPECIALIZATION(TAG) \ +template \ +struct property_map \ +{ \ + typedef typename CGAL::internal::T2_property_map map_gen; \ + typedef typename map_gen::type type; \ + typedef typename map_gen::const_type const_type; \ +}; \ +\ +template \ +struct property_map \ +{ \ + typedef typename CGAL::internal::T2_property_map map_gen; \ + typedef typename map_gen::type type; \ + typedef typename map_gen::const_type const_type; \ }; -// see struct property_map in Polyehdron for an explanation -template -struct property_map -{ - typedef typename CGAL::internal::T2_property_map map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; -}; +CGAL_PM_SPECIALIZATION(vertex_point_t) +CGAL_PM_SPECIALIZATION(edge_weight_t) +CGAL_PM_SPECIALIZATION(vertex_index_t) +CGAL_PM_SPECIALIZATION(halfedge_index_t) +CGAL_PM_SPECIALIZATION(edge_index_t) +CGAL_PM_SPECIALIZATION(face_index_t) + +#undef CGAL_PM_SPECIALIZATION } // end namespace boost diff --git a/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h b/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h index c8d01f3f239..d5583e000b8 100644 --- a/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h +++ b/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h @@ -284,23 +284,31 @@ get(boost::face_index_t, const Triangulation_data_structure_2&) namespace boost { -// g++ 'enumeral_type' in template unification not implemented workaround -template -struct property_map, Tag> -{ - typedef typename CGAL::internal::TDS2_property_map map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; +#define CGAL_PM_SPECIALIZATION(TAG) \ +template \ +struct property_map, TAG> \ +{ \ + typedef typename CGAL::internal::TDS2_property_map map_gen; \ + typedef typename map_gen::type type; \ + typedef typename map_gen::const_type const_type; \ +}; \ +\ +template \ +struct property_map, TAG> \ +{ \ + typedef typename CGAL::internal::TDS2_property_map map_gen; \ + typedef typename map_gen::type type; \ + typedef typename map_gen::const_type const_type; \ }; -// see struct property_map in Polyehdron for an explanation -template -struct property_map, Tag> -{ - typedef typename CGAL::internal::TDS2_property_map map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; -}; +CGAL_PM_SPECIALIZATION(vertex_point_t) +CGAL_PM_SPECIALIZATION(edge_weight_t) +CGAL_PM_SPECIALIZATION(vertex_index_t) +CGAL_PM_SPECIALIZATION(halfedge_index_t) +CGAL_PM_SPECIALIZATION(edge_index_t) +CGAL_PM_SPECIALIZATION(face_index_t) + +#undef CGAL_PM_SPECIALIZATION } // namespace boost