16 #include <boost/hana/type.hpp>
17 #include <boost/hana/unpack.hpp>
19 namespace hana = boost::hana;
33 template <
typename... aborters_t>
34 struct AbortList :
public detail::Extendable<aborters_t...> {
36 static_assert(not detail::has_duplicates_v<aborters_t...>,
37 "same aborter type specified several times");
39 using detail::Extendable<aborters_t...>
::tuple;
43 using result_type =
typename decltype(hana::unpack(
44 detail::type_collector_t<detail::action_type_extractor, aborters_t...>,
45 hana::template_<AbortList>))::
type;
47 using detail::Extendable<aborters_t...>::get;
50 AbortList() =
default;
55 AbortList(
const AbortList<aborters_t...>& aborters) =
default;
60 AbortList(AbortList<aborters_t...>&& aborters) =
default;
66 const AbortList<aborters_t...>& aborters) =
default;
71 AbortList<aborters_t...>&
operator=(AbortList<aborters_t...>&& aborters) =
77 AbortList(
const std::tuple<aborters_t...>& aborters)
78 : detail::Extendable<aborters_t...>(aborters) {}
83 AbortList(std::tuple<aborters_t...>&& aborters)
84 : detail::Extendable<aborters_t...>(std::
move(aborters)) {}
87 template <
typename... appendices_t>
88 AbortList<aborters_t..., appendices_t...> append(appendices_t... aps)
const {
90 std::tuple_cat(
tuple(), std::tuple<appendices_t...>(aps...));
91 return AbortList<aborters_t..., appendices_t...>(
std::move(catTuple));
106 template <
typename propagator_state_t,
typename stepper_t,
107 typename navigator_t,
typename result_t,
typename...
Args>
108 bool operator()(propagator_state_t&
state,
const stepper_t&
stepper,
109 const navigator_t&
navigator,
const result_t& result,
111 using impl = detail::abort_list_impl<aborters_t...>;
113 std::forward<Args>(
args)...);