Loading...
Searching...
No Matches
traits.hpp File Reference

Provides traits for seqan3::type_list. More...

`#include <type_traits>`
`#include <seqan3/utility/type_list/type_list.hpp>`
`#include <seqan3/utility/type_pack/traits.hpp>`
Include dependency graph for type_list/traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

namespace | seqan3
| The main SeqAn3 namespace.
namespace | seqan3::list_traits
| Namespace containing traits for working on seqan3::type_list.

## Typedefs

Type list traits (return a single type)
template<ptrdiff_t idx, typename list_t>
using | seqan3::list_traits::at = typename decltype(detail::at<idx>(list_t{}))::type
| Return the type at given index from the type list.
template<typename list_t>
using | seqan3::list_traits::back = typename decltype(detail::back(list_t{}))::type
| Return the last type from the type list.
template<typename list_t>
using | seqan3::list_traits::front = typename decltype(detail::front(list_t{}))::type
| Return the first type from the type list.
Type list traits (return a type list)
template<typename... lists_t>
using | seqan3::list_traits::concat = decltype(detail::concat(lists_t{}...))
| Join two seqan3::type_list s into one.
template<ptrdiff_t i, typename list_t>
using | seqan3::list_traits::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<typename list_t>
using | seqan3::list_traits::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 | seqan3::list_traits::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<size_t count, typename t>
using | seqan3::list_traits::repeat = decltype(detail::repeat<count, t>())
| Create a type list with the given type repeated count times..
template<typename replace_t, std::ptrdiff_t i, typename list_t>
using | seqan3::list_traits::replace_at = decltype(detail::replace_at<replace_t, i>(list_t{}))
| Replace the type at the given index with the given type.
template<ptrdiff_t i, typename list_t>
using | seqan3::list_traits::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<ptrdiff_t i, typename list_t>
using | seqan3::list_traits::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 | seqan3::list_traits::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<template< typename > typename trait_t, typename list_t>
using | seqan3::list_traits::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.

## Functions

template<ptrdiff_t idx, typename... pack_t>
std::type_identity< seqan3::pack_traits::at< idx, pack_t... > > | seqan3::list_traits::detail::at (type_list< pack_t... >)
| Implementation for seqan3::list_traits::at.
template<typename... pack_t>
std::type_identity< seqan3::pack_traits::back< pack_t... > > | seqan3::list_traits::detail::back (type_list< pack_t... >)
| Implementation for seqan3::list_traits::back.
template<typename... pack1_t, typename... pack2_t, typename... more_lists_t>
auto | seqan3::list_traits::detail::concat (type_list< pack1_t... >, type_list< pack2_t... >, more_lists_t...)
| Implementation for seqan3::list_traits::concat [overload for more than two lists].
template<typename... pack_t>
pack_traits::drop_front< pack_t... > | seqan3::list_traits::detail::drop_front (type_list< pack_t... >)
| Implementation for seqan3::list_traits::drop_front.
template<typename... pack_t>
std::type_identity< seqan3::pack_traits::front< pack_t... > > | seqan3::list_traits::detail::front (type_list< pack_t... >)
| Implementation for seqan3::list_traits::front.
template<size_t count, typename t>
auto | seqan3::list_traits::detail::repeat ()
| Implementation for seqan3::list_traits::repeat.
template<typename replace_t, ptrdiff_t idx, typename... pack_t>
pack_traits::replace_at< replace_t, idx, pack_t... > | seqan3::list_traits::detail::replace_at (type_list< pack_t... >)
| Implementation for seqan3::list_traits::replace_at.
template<typename head_t, typename... pack_t>
auto | seqan3::list_traits::detail::reverse (type_list< head_t, pack_t... >)
| A replacement for meta::reverse [recursion].
constexpr type_list | seqan3::list_traits::detail::reverse (type_list<>)
| A replacement for meta::reverse [recursion anchor].
template<ptrdiff_t idx, typename... pack1_t>
pack_traits::split_after< idx, pack1_t... > | seqan3::list_traits::detail::split_after (type_list< pack1_t... >)
| Implementation for seqan3::list_traits::split_after.
template<typename... current_list_t, typename remove_t, typename... remove_list_t>
constexpr auto | seqan3::list_traits::detail::type_list_difference (seqan3::type_list< current_list_t... >, seqan3::type_list< remove_t, remove_list_t... >)
| Constructs the multiset difference list1 \ list2 [recursion].
template<typename... current_list_t>
constexpr seqan3::type_list< current_list_t... > | seqan3::list_traits::detail::type_list_difference (seqan3::type_list< current_list_t... >, seqan3::type_list<>)
| Constructs the multiset difference list1 \ list2 [recursion anchor].

## Variables

template<typename... pack1_t, typename... pack2_t>
type_list< pack1_t..., pack2_t... > | seqan3::list_traits::detail::concat (type_list< pack1_t... >, type_list< pack2_t... >)
| Implementation for seqan3::list_traits::concat.
template<template< typename > typename trait_t, typename... pack_t>
pack_traits::transform< trait_t, pack_t... > | seqan3::list_traits::detail::transform (type_list< pack_t... >)
| Implementation for seqan3::list_traits::transform.
Type list traits (return a value)
template<typename query_t, typename list_t>
constexpr bool | seqan3::list_traits::contains = (find<query_t, list_t> != -1)
| Whether a type occurs in a type list or not.
template<typename query_t, typename... pack_t>
constexpr ptrdiff_t | seqan3::list_traits::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 | seqan3::list_traits::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 | seqan3::list_traits::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... pack_t>
constexpr size_t | seqan3::list_traits::size< type_list< pack_t... > > = sizeof...(pack_t)
| The size of a type list.

## Detailed Description

Provides traits for seqan3::type_list.

Author
  Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

Hide me