mirror of https://github.com/CGAL/cgal
Explicit speciliazation is not allowed in class
This commit is contained in:
parent
2cf2ba23a1
commit
a97d60c254
|
|
@ -15,20 +15,22 @@ public:
|
||||||
using Dart_const_handle_orig = typename Gmap_origin::Dart_const_handle;
|
using Dart_const_handle_orig = typename Gmap_origin::Dart_const_handle;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct Weight_functor_selector {
|
struct Weight_functor { using Weight = T; };
|
||||||
using Weight = T;
|
|
||||||
|
template <bool, class T, class>
|
||||||
|
struct Weight_functor_selector : Weight_functor<T> { };
|
||||||
|
|
||||||
|
template <class T, class F>
|
||||||
|
struct Weight_functor_selector<false, T, F> : Weight_functor<F> { };
|
||||||
|
|
||||||
|
struct Default_weight_functor {
|
||||||
|
using Weight_t = unsigned int;
|
||||||
|
Weight_t operator() (Dart_const_handle_orig) const { return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
using Weight = typename Weight_functor_selector<std::is_same<WeightFunctor, void>::value,
|
||||||
struct Weight_functor_selector<void> {
|
Default_weight_functor,
|
||||||
struct Weight {
|
WeightFunctor>::Weight;
|
||||||
using Weight_t = unsigned int;
|
|
||||||
Weight() {}
|
|
||||||
Weight_t operator() (Dart_const_handle_orig) const { return 1; }
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
using Weight = typename Weight_functor_selector<WeightFunctor>::Weight;
|
|
||||||
using Distance_type = typename Weight::Weight_t;
|
using Distance_type = typename Weight::Weight_t;
|
||||||
|
|
||||||
struct Attributes {
|
struct Attributes {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue