From a97d60c25487b597eaa2ac6e0c432740dc352dff Mon Sep 17 00:00:00 2001 From: Thien Hoang Date: Thu, 20 Jun 2019 17:41:58 +0700 Subject: [PATCH] Explicit speciliazation is not allowed in class --- .../CGAL/Shortest_noncontractible_cycle.h | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Surface_mesh_topology/include/CGAL/Shortest_noncontractible_cycle.h b/Surface_mesh_topology/include/CGAL/Shortest_noncontractible_cycle.h index 62e28548d4e..88400983cfe 100644 --- a/Surface_mesh_topology/include/CGAL/Shortest_noncontractible_cycle.h +++ b/Surface_mesh_topology/include/CGAL/Shortest_noncontractible_cycle.h @@ -15,20 +15,22 @@ public: using Dart_const_handle_orig = typename Gmap_origin::Dart_const_handle; template - struct Weight_functor_selector { - using Weight = T; + struct Weight_functor { using Weight = T; }; + + template + struct Weight_functor_selector : Weight_functor { }; + + template + struct Weight_functor_selector : Weight_functor { }; + + struct Default_weight_functor { + using Weight_t = unsigned int; + Weight_t operator() (Dart_const_handle_orig) const { return 1; } }; - template <> - struct Weight_functor_selector { - struct Weight { - using Weight_t = unsigned int; - Weight() {} - Weight_t operator() (Dart_const_handle_orig) const { return 1; } - }; - }; - - using Weight = typename Weight_functor_selector::Weight; + using Weight = typename Weight_functor_selector::value, + Default_weight_functor, + WeightFunctor>::Weight; using Distance_type = typename Weight::Weight_t; struct Attributes {