mirror of https://github.com/CGAL/cgal
version without partial specialization
the norms says that partial specialization should be done in a namespace (not inside a class)
This commit is contained in:
parent
499b9fe8e7
commit
51bc69cca3
|
|
@ -57,24 +57,19 @@ class Regular_traits_adaptor_2
|
|||
typedef typename RTraits::Circle_2 Circle_2;
|
||||
typedef typename RTraits::Weighted_point_2 Weighted_point_2;
|
||||
|
||||
template <typename T>
|
||||
struct Conv_wp_to_p {
|
||||
typedef T type;
|
||||
};
|
||||
template <class T>
|
||||
struct Conv_wp_to_p
|
||||
{
|
||||
typedef typename boost::remove_reference<T>::type T_no_ref;
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<Weighted_point_2> {
|
||||
typedef Point_2 type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<const Weighted_point_2> {
|
||||
typedef const Point_2 type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<const Weighted_point_2&> {
|
||||
typedef const Point_2& type;
|
||||
typedef typename boost::mpl::if_<
|
||||
typename boost::is_const<T_no_ref>::type,
|
||||
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||
const Point_2&,
|
||||
const Point_2>::type,
|
||||
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||
Point_2&,
|
||||
Point_2>::type >::type type;
|
||||
};
|
||||
|
||||
template <typename> struct result {};
|
||||
|
|
|
|||
|
|
@ -57,24 +57,19 @@ class Regular_traits_adaptor
|
|||
typedef typename RTraits::Sphere_3 Sphere_3;
|
||||
typedef typename RTraits::Weighted_point_3 Weighted_point_3;
|
||||
|
||||
template <typename T>
|
||||
struct Conv_wp_to_p {
|
||||
typedef T type;
|
||||
};
|
||||
template <class T>
|
||||
struct Conv_wp_to_p
|
||||
{
|
||||
typedef typename boost::remove_reference<T>::type T_no_ref;
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<Weighted_point_3> {
|
||||
typedef Point_3 type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<const Weighted_point_3> {
|
||||
typedef const Point_3 type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Conv_wp_to_p<const Weighted_point_3&> {
|
||||
typedef const Point_3& type;
|
||||
typedef typename boost::mpl::if_<
|
||||
typename boost::is_const<T_no_ref>::type,
|
||||
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||
const Point_3&,
|
||||
const Point_3>::type,
|
||||
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||
Point_3&,
|
||||
Point_3>::type >::type type;
|
||||
};
|
||||
|
||||
template <typename> struct result {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue