15 namespace requirements
42 #define ADD_REQUIREMENT(T, name, member) \
44 const T<Lightweight> & name() const { return member; } \
45 T<Lightweight> & name() { return member; } \
48 T<Lightweight> member; \
49 template<typename... Args> \
50 void build(const T<Lightweight> & m, const Args &... args) \
52 static_assert(!check_args<T<Lightweight>, Args...>() && !check_args<T<!Lightweight>, Args...>(), \
53 #T " has already been specified"); \
57 template<typename... Args> \
58 void build(const T<!Lightweight> & m, const Args &... args) \
60 static_assert(!check_args<T<Lightweight>, Args...>() && !check_args<T<!Lightweight>, Args...>(), \
61 #T " has already been specified"); \
70 template<
bool Lightweight = true>
81 template<
typename... Args>
86 template<
typename T,
typename Arg0,
typename... Args>
87 static constexpr
bool check_args()
88 {
return std::is_same<T, Arg0>::value || check_args<T, Args...>(); }
91 static constexpr
bool check_args()
97 ADD_REQUIREMENT(ViolationEvaluationBase, violationEvaluation, evalType_)
115 :
SolvingRequirementsBase(req.priorityLevel(), req.weight(), req.anisotropicWeight(), req.violationEvaluation())
119 #undef ADD_REQUIREMENT
#define ADD_REQUIREMENT(T, name, member)
Definition: SolvingRequirements.h:42
Definition: SolvingRequirements.h:72
SolvingRequirementsBase(const Args &... args)
Definition: SolvingRequirements.h:82
Definition: SolvingRequirements.h:108
SolvingRequirementsWithCallbacks(const SolvingRequirementsWithCallbacks &)=delete
SolvingRequirementsWithCallbacks(const SolvingRequirements &req)
Definition: SolvingRequirements.h:114
SolvingRequirementsWithCallbacks & operator=(const SolvingRequirementsWithCallbacks &)=delete
Definition: SolvingRequirements.h:103