22 template <
bool has_result = true>
23 struct condition_caller {
24 template <
typename condition,
typename result_t,
typename propagator_state_t,
26 static bool check(
const condition&
c,
const result_t& r,
27 propagator_state_t& state,
const stepper_t&
stepper) {
28 using action_type = action_type_t<condition>;
29 using result_type = result_type_t<action_type>;
31 return c(state, stepper, r.template get<result_type>());
38 struct condition_caller<
false> {
39 template <
typename condition,
typename result_t,
typename propagator_state_t,
41 static bool check(
const condition&
c,
const result_t& ,
42 propagator_state_t& state,
const stepper_t&
stepper) {
43 return c(state, stepper);
48 template <
typename... conditions>
54 template <
typename first,
typename... others>
56 template <
typename T,
typename result_t,
typename propagator_state_t,
58 static bool check(
const T& conditions_tuple,
const result_t& result,
59 propagator_state_t& state,
const stepper_t&
stepper) {
61 constexpr
bool has_result = has_action_type_v<first>;
62 using caller_type = condition_caller<has_result>;
65 const auto& this_condition = std::get<first>(conditions_tuple);
70 bool abort = caller_type::check(this_condition, result, state, stepper) ||
79 template <
typename last>
81 template <
typename T,
typename result_t,
typename propagator_state_t,
83 static bool check(
const T& conditions_tuple,
const result_t& result,
84 propagator_state_t& state,
const stepper_t&
stepper) {
86 constexpr
bool has_result = has_action_type_v<last>;
87 const auto& this_condition = std::get<last>(conditions_tuple);
89 return condition_caller<has_result>::check(this_condition, result, state,
97 template <
typename T,
typename result_t,
typename propagator_state_t,
99 static bool check(
const T& ,
const result_t& ,
100 propagator_state_t& ,