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::Circle_2 Circle_2;
|
||||||
typedef typename RTraits::Weighted_point_2 Weighted_point_2;
|
typedef typename RTraits::Weighted_point_2 Weighted_point_2;
|
||||||
|
|
||||||
template <typename T>
|
template <class T>
|
||||||
struct Conv_wp_to_p {
|
struct Conv_wp_to_p
|
||||||
typedef T type;
|
{
|
||||||
};
|
typedef typename boost::remove_reference<T>::type T_no_ref;
|
||||||
|
|
||||||
template <>
|
typedef typename boost::mpl::if_<
|
||||||
struct Conv_wp_to_p<Weighted_point_2> {
|
typename boost::is_const<T_no_ref>::type,
|
||||||
typedef Point_2 type;
|
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||||
};
|
const Point_2&,
|
||||||
|
const Point_2>::type,
|
||||||
template <>
|
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||||
struct Conv_wp_to_p<const Weighted_point_2> {
|
Point_2&,
|
||||||
typedef const Point_2 type;
|
Point_2>::type >::type type;
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct Conv_wp_to_p<const Weighted_point_2&> {
|
|
||||||
typedef const Point_2& type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename> struct result {};
|
template <typename> struct result {};
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,19 @@ class Regular_traits_adaptor
|
||||||
typedef typename RTraits::Sphere_3 Sphere_3;
|
typedef typename RTraits::Sphere_3 Sphere_3;
|
||||||
typedef typename RTraits::Weighted_point_3 Weighted_point_3;
|
typedef typename RTraits::Weighted_point_3 Weighted_point_3;
|
||||||
|
|
||||||
template <typename T>
|
template <class T>
|
||||||
struct Conv_wp_to_p {
|
struct Conv_wp_to_p
|
||||||
typedef T type;
|
{
|
||||||
};
|
typedef typename boost::remove_reference<T>::type T_no_ref;
|
||||||
|
|
||||||
template <>
|
typedef typename boost::mpl::if_<
|
||||||
struct Conv_wp_to_p<Weighted_point_3> {
|
typename boost::is_const<T_no_ref>::type,
|
||||||
typedef Point_3 type;
|
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||||
};
|
const Point_3&,
|
||||||
|
const Point_3>::type,
|
||||||
template <>
|
typename boost::mpl::if_<typename boost::is_reference<T>::type,
|
||||||
struct Conv_wp_to_p<const Weighted_point_3> {
|
Point_3&,
|
||||||
typedef const Point_3 type;
|
Point_3>::type >::type type;
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct Conv_wp_to_p<const Weighted_point_3&> {
|
|
||||||
typedef const Point_3& type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename> struct result {};
|
template <typename> struct result {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue