SeqAn3 3.4.0
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::list_traits Namespace Reference

Namespace containing traits for working on seqan3::type_list. More...

Typedefs

Type list traits (return a single type)
template<ptrdiff_t idx, typename list_t>
using at = typename decltype(detail::at<idx>(list_t{}))::type
 Return the type at given index from the type list.
template<typename list_t>
using front = typename decltype(detail::front(list_t{}))::type
 Return the first type from the type list.
template<typename list_t>
using back = typename decltype(detail::back(list_t{}))::type
 Return the last type from the type list.
Type list traits (return a type list)
template<typename... lists_t>
using concat = decltype(detail::concat(lists_t{}...))
 Join two seqan3::type_list s into one.
template<typename list_t>
using drop_front = decltype(detail::drop_front(list_t{}))
 Return a seqan3::type_list of all the types in the type list, except the first.
template<ptrdiff_t i, typename list_t>
using take = typename decltype(detail::split_after<i>(list_t{}))::first_type
 Return a seqan3::type_list of the first n types in the input type list.
template<ptrdiff_t i, typename list_t>
using drop = typename decltype(detail::split_after<i>(list_t{}))::second_type
 Return a seqan3::type_list of the types in the input type list, except the first n.
template<ptrdiff_t i, typename list_t>
using take_last = drop<size<list_t> - i, list_t>
 Return a seqan3::type_list of the last n types in the input type list.
template<ptrdiff_t i, typename list_t>
using drop_last = take<size<list_t> - i, list_t>
 Return a seqan3::type_list of the types the input type list, except the last n.
template<ptrdiff_t i, typename list_t>
using split_after = decltype(detail::split_after<i>(list_t{}))
 Split a seqan3::type_list into two parts returned as a pair of seqan3::type_list.
template<template< typename > typename trait_t, typename list_t>
using transform = decltype(detail::transform<trait_t>(list_t{}))
 Apply a transformation trait to every type in the list and return a seqan3::type_list of the results.
template<typename replace_t, std::ptrdiff_t i, typename list_t>
using replace_at = decltype(detail::replace_at<replace_t, i>(list_t{}))
 Replace the type at the given index with the given type.
template<size_t count, typename t>
using repeat = decltype(detail::repeat<count, t>())
 Create a type list with the given type repeated count times..

Variables

Type list traits (return a value)
template<typename... pack_t>
constexpr size_t size< type_list< pack_t... > > = sizeof...(pack_t)
 The size of a type list.
template<typename query_t, typename... pack_t>
constexpr ptrdiff_t count< query_t, type_list< pack_t... > > = seqan3::pack_traits::count<query_t, pack_t...>
 Count the occurrences of a type in a type list.
template<typename query_t, typename... pack_t>
constexpr ptrdiff_t find< query_t, type_list< pack_t... > >
 Get the index of the first occurrence of a type in a type list.
template<template< typename > typename pred_t, typename... pack_t>
constexpr ptrdiff_t find_if< pred_t, type_list< pack_t... > >
 Get the index of the first type in a type list that satisfies the given predicate.
template<typename query_t, typename list_t>
constexpr bool contains = (find<query_t, list_t> != -1)
 Whether a type occurs in a type list or not.

Detailed Description

Namespace containing traits for working on seqan3::type_list.

Hide me