21 template <
bool has_result = true>
22 struct condition_caller {
23 template <
typename condition,
typename result_t,
typename propagator_state_t,
25 static bool check(
const condition&
c,
const result_t&
r,
26 propagator_state_t& state,
const stepper_t&
stepper) {
27 using action_type = action_type_t<condition>;
28 using result_type = result_type_t<action_type>;
30 return c(state, stepper, r.template get<result_type>());
37 struct condition_caller<
false> {
38 template <
typename condition,
typename result_t,
typename propagator_state_t,
40 static bool check(
const condition&
c,
const result_t& ,
41 propagator_state_t& state,
const stepper_t&
stepper) {
42 return c(state, stepper);
47 template <
typename... conditions>
53 template <
typename first,
typename... others>
55 template <
typename T,
typename result_t,
typename propagator_state_t,
57 static bool check(
const T& conditions_tuple,
const result_t& result,
58 propagator_state_t& state,
const stepper_t&
stepper) {
60 constexpr
bool has_result = has_action_type_v<first>;
61 using caller_type = condition_caller<has_result>;
64 const auto& this_condition = std::get<first>(conditions_tuple);
69 bool abort = caller_type::check(this_condition, result, state, stepper) ||
78 template <
typename last>
80 template <
typename T,
typename result_t,
typename propagator_state_t,
82 static bool check(
const T& conditions_tuple,
const result_t& result,
83 propagator_state_t& state,
const stepper_t&
stepper) {
85 constexpr
bool has_result = has_action_type_v<last>;
86 const auto& this_condition = std::get<last>(conditions_tuple);
88 return condition_caller<has_result>::check(this_condition, result, state,
96 template <
typename T,
typename result_t,
typename propagator_state_t,
98 static bool check(
const T& ,
const result_t& ,