SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
traits.hpp File Reference

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

+ Include dependency graph for traits.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 seqan3
 The main SeqAn3 namespace.
 
 seqan3::list_traits
 Namespace containing traits for working on seqan3::type_list.
 
 seqan3::pack_traits
 Namespace containing traits for working on type packs.
 

Typedefs

Type pack traits (return a single type)
template<ptrdiff_t idx, typename ... pack_t>
using seqan3::pack_traits::at = typename decltype(detail::at< idx, pack_t... >())::type
 Return the type at given index from the type pack. More...
 
template<typename ... pack_t>
using seqan3::pack_traits::back = typename decltype((std::type_identity< pack_t >{},...))::type
 Return the last type from the type pack. More...
 
template<typename ... pack_t>
using seqan3::pack_traits::front = typename decltype(detail::front< pack_t... >())::type
 Return the first type from the type pack. More...
 
Type pack traits (return a type list)
template<ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::drop = seqan3::list_traits::drop< i, type_list< pack_t... > >
 Return a seqan3::type_list of the types in the type pack, except the first n. More...
 
template<typename ... pack_t>
using seqan3::pack_traits::drop_front = typename decltype(detail::drop_front< pack_t... >())::type
 Return a seqan3::type_list of all the types in the type pack, except the first. More...
 
template<ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::drop_last = seqan3::list_traits::drop_last< i, type_list< pack_t... > >
 Return a seqan3::type_list of the types the type pack, except the last n. More...
 
template<typename replace_t , std::ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::replace_at = decltype(seqan3::list_traits::replace_at< replace_t, i, type_list< pack_t... > >())
 Replace the type at the given index with the given type. More...
 
template<ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::split_after = seqan3::list_traits::split_after< i, type_list< pack_t... > >
 Split a type pack into two parts returned as a pair of seqan3::type_list. More...
 
template<ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::take = seqan3::list_traits::take< i, type_list< pack_t... > >
 Return a seqan3::type_list of the first n types in the type pack. More...
 
template<ptrdiff_t i, typename ... pack_t>
using seqan3::pack_traits::take_last = seqan3::list_traits::take_last< i, type_list< pack_t... > >
 Return a seqan3::type_list of the last n types in the type pack. More...
 
template<template< typename > typename trait_t, typename ... pack_t>
using seqan3::pack_traits::transform = seqan3::type_list< trait_t< pack_t >... >
 Apply a transformation trait to every type in the pack and return a seqan3::type_list of the results. More...
 
Type list traits (return a single type)
template<ptrdiff_t idx, seqan3::detail::type_list_specialisation 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. More...
 
template<seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::back = typename decltype(detail::back(list_t{}))::type
 Return the last type from the type list. More...
 
template<seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::front = typename decltype(detail::front(list_t{}))::type
 Return the first type from the type list. More...
 
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. More...
 
template<ptrdiff_t i, seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::drop = typename decltype(detail::split_after< i >(type_list<>{}, list_t{}))::second_type
 Return a seqan3::type_list of the types in the input type list, except the first n. More...
 
template<seqan3::detail::type_list_specialisation 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. More...
 
template<ptrdiff_t i, seqan3::detail::type_list_specialisation 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. More...
 
template<typename replace_t , std::ptrdiff_t i, seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::replace_at = decltype(detail::replace_at< replace_t >(detail::split_after< i >(type_list<>{}, list_t{})))
 Replace the type at the given index with the given type. More...
 
template<ptrdiff_t i, seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::split_after = decltype(detail::split_after< i >(type_list<>{}, list_t{}))
 Split a seqan3::type_list into two parts returned as a pair of seqan3::type_list. More...
 
template<ptrdiff_t i, seqan3::detail::type_list_specialisation list_t>
using seqan3::list_traits::take = typename decltype(detail::split_after< i >(type_list<>{}, list_t{}))::first_type
 Return a seqan3::type_list of the first n types in the input type list. More...
 
template<ptrdiff_t i, seqan3::detail::type_list_specialisation 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. More...
 
template<template< typename > typename trait_t, seqan3::detail::type_list_specialisation 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. More...
 

Variables

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

Detailed Description

Provides traits for seqan3::type_list.

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