mirror of https://github.com/CGAL/cgal
provided full specialization of kernel_traits only for compilers that does not support partial specializations
This commit is contained in:
parent
7c409d1a3a
commit
05f1c2bb67
|
|
@ -97,12 +97,23 @@ public:
|
|||
};
|
||||
|
||||
namespace CGAL {
|
||||
#ifndef CGAL_CFG_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
|
||||
// Specialize CGAL::Kernel_traits<> for my point type(s).
|
||||
template <int dim>
|
||||
class Kernel_traits < Point_float_d<dim> > {
|
||||
struct Kernel_traits < Point_float_d<dim> > {
|
||||
public:
|
||||
typedef My_kernel<dim> Kernel;
|
||||
};
|
||||
#else
|
||||
//for compilers that doesn't support partial specialization
|
||||
//of class templates we provide the full specialization for
|
||||
//the specific types used
|
||||
template <>
|
||||
struct Kernel_traits < Point_float_d<4> > {
|
||||
public:
|
||||
typedef My_kernel<4> Kernel;
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef Point_float_d<4> point;
|
||||
|
|
@ -181,3 +192,4 @@ int main()
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue