17 #include <type_traits>
19 #include <meta/meta.hpp>
27 template <
typename derived_t,
typename value_t =
void>
28 struct pipeable_config_element;
44 template <
typename algorithm_
id_type>
51 #if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
61 struct config_id_accessor
65 template <
typename config_t>
69 template <
typename config_t>
70 static constexpr
auto has_id_member(
int) -> decltype((
static_cast<void>(config_t::id),
true))
76 template <
typename config_t>
77 static constexpr
bool has_id_member(...)
84 template <
typename config_t>
97 template <
typename config1_t,
typename config2_t>
98 static constexpr
auto is_compatible()
100 if constexpr (has_id_member<config1_t>(0) && has_id_member<config2_t>(0))
102 using config1_id_t = id_type<config1_t>;
103 using config2_id_t = id_type<config2_t>;
105 if constexpr (std::same_as<config1_id_t, config2_id_t>)
117 template <
typename config_t>
118 static constexpr
bool has_id = has_id_member<config_t>(0);
140 template <
typename config_t>
143 requires std::is_base_of_v<seqan3::pipeable_config_element<config_t>, config_t>;
144 requires std::semiregular<config_t>;
145 #if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
146 requires config_id_accessor::has_id<config_t>;
169 template <
typename config1_t,
typename config2_t>
173 #if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
174 std::same_as<config_id_accessor::id_type<config1_t>, config_id_accessor::id_type<config2_t>> &&
175 decltype(config_id_accessor::is_compatible<config1_t, config2_t>())::value;
179 [
static_cast<int32_t
>(config2_t::id)];
189 template <detail::config_element ... configs_t>
213 template <
typename config1_t,
typename config2_t>
218 template <
typename config1_t,
typename ...configs2_t>
220 (detail::config_element_pipeable_with<config1_t, configs2_t> && ...);
223 template <
typename ...configs1_t,
typename config2_t>
225 (detail::config_element_pipeable_with<configs1_t, config2_t> && ...);
228 template <
typename ...configs1_t,
typename ...configs2_t>
Collection of elements to configure an algorithm.
Definition: configuration.hpp:46
Provides type traits for working with templates.
constexpr bool is_config_element_combineable_v
Helper variable template to test if a configuration element is combineable with another configuration...
Definition: concept.hpp:214
constexpr std::array< std::array< void *, 0 >, 0 > compatibility_table
Declaration of algorithm specific compatibility table.
Definition: concept.hpp:45
Concept to check if one configuration element can be combined with another configuration element.
Concept for an algorithm configuration element.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29