provided full specialization of kernel_traits only for compilers that does not support partial specializations

This commit is contained in:
Radu Ursu 2003-07-30 13:48:41 +00:00
parent 7c409d1a3a
commit 05f1c2bb67
1 changed files with 13 additions and 1 deletions

View File

@ -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;
}