From 05f1c2bb67482eb8490f0be3637c41eef70014ea Mon Sep 17 00:00:00 2001 From: Radu Ursu Date: Wed, 30 Jul 2003 13:48:41 +0000 Subject: [PATCH] provided full specialization of kernel_traits only for compilers that does not support partial specializations --- .../test/Spatial_searching/Kdtree_example3.C | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Packages/Spatial_searching/test/Spatial_searching/Kdtree_example3.C b/Packages/Spatial_searching/test/Spatial_searching/Kdtree_example3.C index 8931edd8f2b..42dcbc6f5e7 100755 --- a/Packages/Spatial_searching/test/Spatial_searching/Kdtree_example3.C +++ b/Packages/Spatial_searching/test/Spatial_searching/Kdtree_example3.C @@ -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 - class Kernel_traits < Point_float_d > { + struct Kernel_traits < Point_float_d > { public: typedef My_kernel 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; } +