mirror of https://github.com/CGAL/cgal
restrict partial specialization to avoid grab everything
This commit is contained in:
parent
ed2067f461
commit
09039464ef
|
|
@ -475,25 +475,19 @@ void reserve(HalfedgeDS_default<T,I,A>& p,
|
||||||
}// namespace CGAL
|
}// namespace CGAL
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
// property_map dispatcher into Polyhedron
|
#define CGAL_PM_SPECIALIZATION(TAG) \
|
||||||
template<class T, class I, class A, class Tag>
|
template<class T, class I, class A> \
|
||||||
struct property_map<CGAL::HalfedgeDS_default<T,I,A>, Tag>
|
struct property_map<CGAL::HalfedgeDS_default<T,I,A>, TAG> \
|
||||||
{
|
{\
|
||||||
typedef typename CGAL::HDS_property_map<Tag>::
|
typedef typename CGAL::HDS_property_map<TAG>:: \
|
||||||
template bind_<T,I,A> map_gen;
|
template bind_<T,I,A> map_gen; \
|
||||||
typedef typename map_gen::type type;
|
typedef typename map_gen::type type; \
|
||||||
typedef typename map_gen::const_type const_type;
|
typedef typename map_gen::const_type const_type; \
|
||||||
};
|
};
|
||||||
|
|
||||||
// property_map dispatcher into const Polyhedron
|
CGAL_PM_SPECIALIZATION(vertex_point_t)
|
||||||
template<class T, class I, class A, class Tag>
|
|
||||||
struct property_map<const CGAL::HalfedgeDS_default<T,I,A>, Tag>
|
#undef CGAL_PM_SPECIALIZATION
|
||||||
{
|
|
||||||
typedef typename CGAL::HDS_property_map<Tag>::
|
|
||||||
template bind_<T,I,A> map_gen;
|
|
||||||
typedef typename map_gen::type type;
|
|
||||||
typedef typename map_gen::const_type const_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -239,23 +239,31 @@ struct T2_property_map<Tr, boost::face_index_t>
|
||||||
// overloads and specializations in the boost namespace
|
// overloads and specializations in the boost namespace
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
// g++ 'enumeral_type' in template unification not implemented workaround
|
#define CGAL_PM_SPECIALIZATION(TAG) \
|
||||||
template <CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS, class Tag>
|
template <CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS> \
|
||||||
struct property_map<CGAL_2D_TRIANGULATION, Tag>
|
struct property_map<CGAL_2D_TRIANGULATION, TAG> \
|
||||||
{
|
{ \
|
||||||
typedef typename CGAL::internal::T2_property_map<CGAL_2D_TRIANGULATION, Tag> map_gen;
|
typedef typename CGAL::internal::T2_property_map<CGAL_2D_TRIANGULATION, TAG> map_gen; \
|
||||||
typedef typename map_gen::type type;
|
typedef typename map_gen::type type; \
|
||||||
typedef typename map_gen::const_type const_type;
|
typedef typename map_gen::const_type const_type; \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
template <CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS> \
|
||||||
|
struct property_map<const CGAL_2D_TRIANGULATION, TAG> \
|
||||||
|
{ \
|
||||||
|
typedef typename CGAL::internal::T2_property_map<CGAL_2D_TRIANGULATION, TAG> 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
|
CGAL_PM_SPECIALIZATION(vertex_point_t)
|
||||||
template <CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS, class Tag>
|
CGAL_PM_SPECIALIZATION(edge_weight_t)
|
||||||
struct property_map<const CGAL_2D_TRIANGULATION, Tag>
|
CGAL_PM_SPECIALIZATION(vertex_index_t)
|
||||||
{
|
CGAL_PM_SPECIALIZATION(halfedge_index_t)
|
||||||
typedef typename CGAL::internal::T2_property_map<CGAL_2D_TRIANGULATION, Tag> map_gen;
|
CGAL_PM_SPECIALIZATION(edge_index_t)
|
||||||
typedef typename map_gen::type type;
|
CGAL_PM_SPECIALIZATION(face_index_t)
|
||||||
typedef typename map_gen::const_type const_type;
|
|
||||||
};
|
#undef CGAL_PM_SPECIALIZATION
|
||||||
|
|
||||||
} // end namespace boost
|
} // end namespace boost
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -284,23 +284,31 @@ get(boost::face_index_t, const Triangulation_data_structure_2<VB,FB>&)
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
// g++ 'enumeral_type' in template unification not implemented workaround
|
#define CGAL_PM_SPECIALIZATION(TAG) \
|
||||||
template <class VB, class FB, class Tag>
|
template <class VB, class FB> \
|
||||||
struct property_map<CGAL::Triangulation_data_structure_2<VB,FB>, Tag>
|
struct property_map<CGAL::Triangulation_data_structure_2<VB,FB>, TAG> \
|
||||||
{
|
{ \
|
||||||
typedef typename CGAL::internal::TDS2_property_map<VB, FB, Tag> map_gen;
|
typedef typename CGAL::internal::TDS2_property_map<VB, FB, TAG> map_gen; \
|
||||||
typedef typename map_gen::type type;
|
typedef typename map_gen::type type; \
|
||||||
typedef typename map_gen::const_type const_type;
|
typedef typename map_gen::const_type const_type; \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
template <class VB, class FB> \
|
||||||
|
struct property_map<const CGAL::Triangulation_data_structure_2<VB,FB>, TAG> \
|
||||||
|
{ \
|
||||||
|
typedef typename CGAL::internal::TDS2_property_map<VB, FB, TAG> 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
|
CGAL_PM_SPECIALIZATION(vertex_point_t)
|
||||||
template <class VB, class FB, class Tag>
|
CGAL_PM_SPECIALIZATION(edge_weight_t)
|
||||||
struct property_map<const CGAL::Triangulation_data_structure_2<VB,FB>, Tag>
|
CGAL_PM_SPECIALIZATION(vertex_index_t)
|
||||||
{
|
CGAL_PM_SPECIALIZATION(halfedge_index_t)
|
||||||
typedef typename CGAL::internal::TDS2_property_map<VB, FB, Tag> map_gen;
|
CGAL_PM_SPECIALIZATION(edge_index_t)
|
||||||
typedef typename map_gen::type type;
|
CGAL_PM_SPECIALIZATION(face_index_t)
|
||||||
typedef typename map_gen::const_type const_type;
|
|
||||||
};
|
#undef CGAL_PM_SPECIALIZATION
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue