26struct pipeable_config_element;
30namespace seqan3::detail
42template <
typename algorithm_
id_type>
49#if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
59struct config_id_accessor
63 template <
typename config_t>
67 template <
typename config_t>
68 static constexpr auto has_id_member(
int) ->
decltype((
static_cast<void>(config_t::id),
true))
74 template <
typename config_t>
75 static constexpr bool has_id_member(...)
82 template <
typename config_t>
95 template <
typename config1_t,
typename config2_t>
96 static constexpr auto is_compatible()
98 if constexpr (has_id_member<config1_t>(0) && has_id_member<config2_t>(0))
100 using config1_id_t = id_type<config1_t>;
101 using config2_id_t = id_type<config2_t>;
103 if constexpr (std::same_as<config1_id_t, config2_id_t>)
104 return std::bool_constant<compatibility_table<config1_id_t>[as_int<config1_t>][as_int<config2_t>]>{};
115 template <
typename config_t>
116 static constexpr bool has_id = has_id_member<config_t>(0);
138template <
typename config_t>
139SEQAN3_CONCEPT config_element =
requires
141 requires std::is_base_of_v<seqan3::pipeable_config_element, config_t>;
142 requires std::semiregular<config_t>;
143#if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
144 requires config_id_accessor::has_id<config_t>;
167template <
typename config1_t,
typename config2_t>
168SEQAN3_CONCEPT config_element_pipeable_with =
169 config_element<config1_t> &&
170 config_element<config2_t> &&
171#if SEQAN3_WORKAROUND_GCC_PIPEABLE_CONFIG_CONCEPT
172 std::same_as<config_id_accessor::id_type<config1_t>, config_id_accessor::id_type<config2_t>> &&
173 decltype(config_id_accessor::is_compatible<config1_t, config2_t>())::value;
176 compatibility_table<
std::remove_cvref_t<
decltype(config1_t::id)>>[
static_cast<int32_t
>(config1_t::id)]
177 [
static_cast<int32_t
>(config2_t::id)];
187template <detail::config_element ... configs_t>
211template <
typename config1_t,
typename config2_t>
216template <
typename config1_t,
typename ...configs2_t>
218 (detail::config_element_pipeable_with<config1_t, configs2_t> && ...);
221template <
typename ...configs1_t,
typename config2_t>
223 (detail::config_element_pipeable_with<configs1_t, config2_t> && ...);
226template <
typename ...configs1_t,
typename ...configs2_t>
Collection of elements to configure an algorithm.
Definition: configuration.hpp:45
The <concepts> header from C++20's standard library.
constexpr bool is_config_element_combineable_v
Helper variable template to test if a configuration element is combineable with another configuration...
Definition: concept.hpp:212
The main SeqAn3 namespace.
Definition: cigar_operation_table.hpp:2
Provides type traits for working with templates.