21namespace seqan3::list_traits::detail
29template <ptrdiff_t idx,
typename... pack_t>
36template <
typename...
pack_t>
43template <
typename...
pack_t>
70template <
typename...
pack_t>
78template <
template <
typename>
typename trait_t,
typename...
pack_t>
94template <
size_t count,
typename t>
97 if constexpr (count == 0)
99 else if constexpr (count == 1)
101 else if constexpr (count == 2)
103 else if constexpr (count == 3)
105 else if constexpr (count == 4)
107 else if constexpr (count == 5)
148 if constexpr (pos >= 0)
180template <
typename list_t>
181 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
182inline constexpr size_t size = 0;
191template <
typename...
pack_t>
195template <
typename query_t,
typename list_t>
196 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
197inline constexpr ptrdiff_t count = -1;
210template <
typename query_t,
typename list_t>
211 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
212inline constexpr ptrdiff_t find = -1;
226template <
template <
typename>
typename pred_t,
typename list_t>
227 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
228inline constexpr ptrdiff_t find_if = -1;
237template <
template <
typename>
typename pred_t,
typename...
pack_t>
247template <
typename query_t,
typename list_t>
248 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
273template <ptrdiff_t
idx,
typename list_t>
274 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>)
276using at =
typename decltype(detail::at<idx>(
list_t{}))::type;
291template <
typename list_t>
292 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
size<list_t> > 0)
311template <
typename list_t>
312 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
size<list_t> > 0)
338 requires (seqan3::detail::template_specialisation_of<lists_t, seqan3::type_list> && ...)
354template <
typename list_t>
355 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
size<list_t> > 0)
372template <ptrdiff_t i,
typename list_t>
373 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <=
size<list_t>)
374using take =
typename decltype(detail::split_after<i>(
list_t{}))::first_type;
390template <ptrdiff_t i,
typename list_t>
391 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <=
size<list_t>)
392using drop =
typename decltype(detail::split_after<i>(
list_t{}))::second_type;
408template <ptrdiff_t i,
typename list_t>
409 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <=
size<list_t>)
426template <ptrdiff_t i,
typename list_t>
427 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <=
size<list_t>)
444template <ptrdiff_t i,
typename list_t>
445 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <=
size<list_t>)
465template <
template <
typename>
typename trait_t,
typename list_t>
466 requires seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>
484template <
typename replace_t, std::ptrdiff_t i,
typename list_t>
485 requires (seqan3::detail::template_specialisation_of<list_t, seqan3::type_list>) && (
i >= 0 &&
i <
size<list_t>)
500template <
size_t count,
typename t>
501using repeat =
decltype(detail::repeat<count, t>());
A "pretty printer" for most SeqAn data structures and related types.
Definition debug_stream_type.hpp:79
decltype(detail::split_after< i >(list_t{})) split_after
Split a seqan3::type_list into two parts returned as a pair of seqan3::type_list.
Definition type_list/traits.hpp:446
typename decltype(detail::split_after< i >(list_t{}))::first_type take
Return a seqan3::type_list of the first n types in the input type list.
Definition type_list/traits.hpp:374
std::type_identity< seqan3::pack_traits::front< pack_t... > > front(type_list< pack_t... >)
Implementation for seqan3::list_traits::front.
decltype(detail::concat(lists_t{}...)) concat
Join two seqan3::type_list s into one.
Definition type_list/traits.hpp:339
constexpr bool contains
Whether a type occurs in a type list or not.
Definition type_list/traits.hpp:249
typename decltype(detail::front(list_t{}))::type front
Return the first type from the type list.
Definition type_list/traits.hpp:293
pack_traits::drop_front< pack_t... > drop_front(type_list< pack_t... >)
Implementation for seqan3::list_traits::drop_front.
auto repeat()
Implementation for seqan3::list_traits::repeat.
Definition type_list/traits.hpp:95
decltype(detail::replace_at< replace_t, i >(list_t{})) replace_at
Replace the type at the given index with the given type.
Definition type_list/traits.hpp:486
pack_traits::transform< trait_t, pack_t... > transform(type_list< pack_t... >)
Implementation for seqan3::list_traits::transform.
decltype(detail::repeat< count, t >()) repeat
Create a type list with the given type repeated count times..
Definition type_list/traits.hpp:501
std::type_identity< seqan3::pack_traits::back< pack_t... > > back(type_list< pack_t... >)
Implementation for seqan3::list_traits::back.
typename decltype(detail::split_after< i >(list_t{}))::second_type drop
Return a seqan3::type_list of the types in the input type list, except the first n.
Definition type_list/traits.hpp:392
typename decltype(detail::at< idx >(list_t{}))::type at
Return the type at given index from the type list.
Definition type_list/traits.hpp:276
std::type_identity< seqan3::pack_traits::at< idx, pack_t... > > at(type_list< pack_t... >)
Implementation for seqan3::list_traits::at.
decltype(detail::transform< trait_t >(list_t{})) transform
Apply a transformation trait to every type in the list and return a seqan3::type_list of the results.
Definition type_list/traits.hpp:467
type_list< pack1_t..., pack2_t... > concat(type_list< pack1_t... >, type_list< pack2_t... >)
Implementation for seqan3::list_traits::concat.
typename decltype(detail::back(list_t{}))::type back
Return the last type from the type list.
Definition type_list/traits.hpp:313
decltype(detail::drop_front(list_t{})) drop_front
Return a seqan3::type_list of all the types in the type list, except the first.
Definition type_list/traits.hpp:356
decltype(detail::replace_at< replace_t, i, pack_t... >(std::make_index_sequence< size< pack_t... > >{})) replace_at
Replace the type at the given index with the given type.
Definition type_pack/traits.hpp:440
typename decltype(detail::drop_front< pack_t... >())::type drop_front
Return a seqan3::type_list of all the types in the type pack, except the first.
Definition type_pack/traits.hpp:305
typename decltype((std::type_identity< pack_t >{},...))::type back
Return the last type from the type pack.
Definition type_pack/traits.hpp:282
constexpr ptrdiff_t find
Get the index of the first occurrence of a type in a pack.
Definition type_pack/traits.hpp:179
constexpr ptrdiff_t count
Count the occurrences of a type in a pack.
Definition type_pack/traits.hpp:161
typename decltype(detail::at< idx, pack_t... >())::type at
Return the type at given index from the type pack.
Definition type_pack/traits.hpp:245
constexpr ptrdiff_t find_if()
Implementation for seqan3::pack_traits::find_if.
Definition type_pack/traits.hpp:44
constexpr ptrdiff_t find()
Implementation for seqan3::pack_traits::find.
Definition type_pack/traits.hpp:31
decltype(detail::split_after< i, pack_t... >(type_list<>{})) split_after
Split a type pack into two parts returned as a pair of seqan3::type_list.
Definition type_pack/traits.hpp:421
typename decltype(detail::front< pack_t... >())::type front
Return the first type from the type pack.
Definition type_pack/traits.hpp:262
Namespace containing traits for working on seqan3::type_list.
Type that contains multiple types.
Definition type_list.hpp:26
constexpr seqan3::type_list< current_list_t... > type_list_difference(seqan3::type_list< current_list_t... >, seqan3::type_list<>)
Constructs the multiset difference list1 \ list2 [recursion anchor].
Definition type_list/traits.hpp:137
Provides seqan3::type_list.
Provides various traits for template packs.