10 #include <type_traits>
44 template <
typename T,
typename propagator_state_t,
typename stepper_t,
46 typename = decltype(std::declval<T>().
operator()(
47 std::declval<propagator_state_t&>(), std::declval<stepper_t&>(),
48 std::declval<result_t&>()))>
49 std::true_type test_action_with_result(
int);
51 template <
typename,
typename,
typename,
typename>
52 std::false_type test_action_with_result(...);
54 template <
typename T,
typename propagator_state_t,
typename stepper_t,
55 typename = decltype(std::declval<T>().
operator()(
56 std::declval<propagator_state_t&>(), std::declval<stepper_t&>()))>
57 std::true_type test_action_without_result(
int);
60 std::false_type test_action_without_result(...);
62 template <
typename T,
typename propagator_state_t,
typename stepper_t,
63 bool has_result =
false>
64 struct action_signature_check_impl
66 test_action_without_result<T, propagator_state_t, stepper_t>(0)) {};
68 template <
typename T,
typename propagator_state_t,
typename stepper_t>
69 struct action_signature_check_impl<
T, propagator_state_t, stepper_t,
true>
70 : decltype(test_action_with_result<T, propagator_state_t, stepper_t,
71 detail::result_type_t<T>>(0)) {};
73 template <
typename T,
typename propagator_state_t,
typename stepper_t>
74 struct action_signature_check
75 : action_signature_check_impl<T, propagator_state_t, stepper_t,
76 detail::has_result_type_v<T>> {};
79 template <
typename T,
typename propagator_state_t,
typename stepper_t>