25 template <
typename type_list_t>
26 struct type_list_expander;
49 template <
template <
typename ...>
typename type_list_t,
typename ...args_t>
50 struct type_list_expander<type_list_t<args_t...>>
62 template <
typename fn_t>
64 requires std::invocable<fn_t, std::type_identity<args_t>...>
106 template <
typename unary_predicate_t,
typename ...pack_t>
108 requires (std::predicate<unary_predicate_t, pack_t> && ...)
110 constexpr
bool all_of(unary_predicate_t && fn, pack_t && ...args)
112 return (fn(std::forward<pack_t>(args)) && ...);
149 template <
typename type_list_t,
typename unary_predicate_t>
150 [[nodiscard]] constexpr
bool all_of(unary_predicate_t && fn)
155 return type_list_expander<type_list_t>::invoke_on_type_identities([&] (
auto && ...type_identities)
192 template <
typename unary_function_t,
typename ...pack_t>
194 requires (std::invocable<unary_function_t, pack_t> && ...)
196 constexpr
void for_each(unary_function_t && fn, pack_t && ...args)
198 (fn(std::forward<pack_t>(args)), ...);
235 template <
typename type_list_t,
typename unary_function_t>
241 type_list_expander<type_list_t>::invoke_on_type_identities([&] (
auto && ...type_identities)
constexpr bool all_of(unary_predicate_t &&fn, pack_t &&...args)
Tests whether a given predicate evaluates to true for each element in the function parameter pack.
Definition: pack_algorithm.hpp:110
constexpr void for_each(unary_function_t &&fn, pack_t &&...args)
Applies a function to each element of the given function parameter pack.
Definition: pack_algorithm.hpp:196
Provides concept seqan3::template_specialisation_of<mytype, [...]> for checking the type specialisati...
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
static constexpr std::invoke_result_t< fn_t, std::type_identity< args_t >... > invoke_on_type_identities(fn_t &&fn)
Invokes the actual function by passing the types as instances of std::type_identity to the target fun...
Definition: pack_algorithm.hpp:66
Provides seqan3::type_list.
Provides C++20 additions to the type_traits header.