SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Helper class to invoke a meta algorithm on the types contained in a seqan3::type_list. More...
#include <seqan3/utility/type_list/detail/type_list_algorithm.hpp>
Static Public Member Functions | |
template<typename fn_t > requires std::invocable<fn_t, std::type_identity<args_t>...> | |
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 function. | |
Helper class to invoke a meta algorithm on the types contained in a seqan3::type_list.
type_list_t | The type list given as a template template parameter. |
args_t | The template arguments contained in type_list_t to apply the target function on. |
The meta algorithms provide a parameter pack version and a seqan3::type_list version. In the type list version the algorithm is called on the types contained in the enclosing type list after they have been wrapped in std::type_identity. Thus, the type list version uses the parameter pack version to call the passed function on the types.
Concrete this helper does the following:
This is a technical trick to make a type representable as a value. Instantiating a type might not always work because not every type provides a default constructor. In addition it is possible to use incomplete types as well.
|
inlinestaticconstexpr |
Invokes the actual function by passing the types as instances of std::type_identity to the target function.
fn_t | The type of the function to be called with the expanded list of types. |
[in] | fn | The function to be called. |
fn
with the expanded list of types.Invokes fn
by passing the expanded types wrapped in std::type_identity.