SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
Type Traits

Provides various type traits and their shortcuts. More...

+ Collaboration diagram for Type Traits:

Classes

interface  seqan3::compatible
 Two types are "compatible" if their seqan3::dimension_v and their seqan3::innermost_value_type_t are the same. More...
 
struct  seqan3::const_reference< t >
 Exposes the const_reference of another type. More...
 
struct  seqan3::const_reference< rng_t >
 Exposes the const_reference of another type. More...
 
struct  seqan3::difference_type< t >
 Exposes the difference_type of another type. More...
 
struct  seqan3::difference_type< it_t >
 Exposes the difference_type of another type. More...
 
struct  seqan3::difference_type< rng_t >
 Exposes the difference_type of another type. More...
 
struct  seqan3::innermost_value_type< t >
 Recursively determines the value_type on containers and/or iterators. More...
 
struct  seqan3::is_constexpr_default_constructible< t >
 Whether a type std::is_default_constructible in constexpr-context. More...
 
struct  seqan3::is_constexpr_default_constructible< t >
 Whether a type std::is_default_constructible in constexpr-context (unary_type_trait specialisation). More...
 
struct  seqan3::iterator_tag< it_t >
 Exposes the iterator_category from the modelled concept. More...
 
struct  seqan3::reference< t >
 Exposes the reference of another type. More...
 
struct  seqan3::reference< it_t >
 Exposes the reference type of another type. More...
 
struct  seqan3::reference< rng_t >
 Exposes the reference of another type. More...
 
struct  seqan3::remove_rvalue_reference< t >
 Return the input type with && removed, but lvalue references preserved. More...
 
struct  seqan3::rvalue_reference< t >
 Exposes the rvalue_reference of another type. More...
 
struct  seqan3::rvalue_reference< it_t >
 Exposes the rvalue_reference type of another type. More...
 
struct  seqan3::rvalue_reference< rng_t >
 Exposes the rvalue_reference of another type. More...
 
struct  seqan3::size_type< t >
 Exposes the size_type of another type. More...
 
struct  seqan3::size_type< it_t >
 Exposes the size_type of another type. More...
 
struct  seqan3::size_type< rng_t >
 Exposes the size_type of another type. More...
 
interface  seqan3::transformation_trait
 Concept for a transformation trait. More...
 
interface  seqan3::unary_type_trait
 Concept for a unary traits type. More...
 
struct  seqan3::value_type< t >
 Exposes the value_type of another type. More...
 
struct  seqan3::value_type< it_t >
 Exposes the value_type of another type. More...
 
struct  seqan3::value_type< rng_t >
 Exposes the value_type of another type. More...
 

Macros

#define SEQAN3_IS_CONSTEXPR(...)   std::integral_constant<bool, __builtin_constant_p((__VA_ARGS__, 0))>::value
 Returns true if the expression passed to this macro can be evaluated at compile time, false otherwise. More...
 
#define SEQAN3_IS_SAME(...)   std::is_same_v<__VA_ARGS__>
 A macro that behaves like std::is_same_v, except that it doesn't need to instantiate the template on GCC and Clang.
 

Typedefs

template<typename t >
using seqan3::const_reference_t = typename const_reference< t >::type
 Shortcut for seqan3::const_reference (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::difference_type_t = typename difference_type< t >::type
 Shortcut for seqan3::difference_type (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::innermost_value_type_t = typename innermost_value_type< t >::type
 Shortcut for seqan3::innermost_value_type (transformation_trait shortcut). More...
 
template<typename it_t >
using seqan3::iterator_tag_t = typename iterator_tag< it_t >::type
 Return the iterator_category type of the input type (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::reference_t = typename reference< t >::type
 Shortcut for seqan3::reference (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::remove_cvref_t = std::remove_cv_t< std::remove_reference_t< t > >
 Return the input type with const, volatile and references removed (type trait). More...
 
template<typename t >
using seqan3::remove_rvalue_reference_t = typename remove_rvalue_reference< t >::type
 Return the input type with && removed, but lvalue references preserved (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::rvalue_reference_t = typename rvalue_reference< t >::type
 Shortcut for seqan3::rvalue_reference (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::size_type_t = typename size_type< t >::type
 Shortcut for seqan3::size_type (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::value_type_t = typename value_type< t >::type
 Shortcut for seqan3::value_type (transformation_trait shortcut). More...
 

Variables

template<typename t >
constexpr size_t seqan3::dimension_v = 1
 Returns the number of times you can call seqan3::value_type_t recursively on t (type trait). More...
 
template<typename t >
constexpr bool is_constexpr_default_constructible_v = is_constexpr_default_constructible<t>::value
 Whether a type std::is_default_constructible in constexpr-context (unary_type_trait shortcut). More...
 

Detailed Description

Provides various type traits and their shortcuts.

Macro Definition Documentation

◆ SEQAN3_IS_CONSTEXPR

#define SEQAN3_IS_CONSTEXPR (   ...)    std::integral_constant<bool, __builtin_constant_p((__VA_ARGS__, 0))>::value

Returns true if the expression passed to this macro can be evaluated at compile time, false otherwise.

Returns
true or false.

Typedef Documentation

◆ const_reference_t

template<typename t >
using seqan3::const_reference_t = typedef typename const_reference<t>::type

Shortcut for seqan3::const_reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::const_reference

◆ difference_type_t

template<typename t >
using seqan3::difference_type_t = typedef typename difference_type<t>::type

Shortcut for seqan3::difference_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::difference_type

◆ innermost_value_type_t

template<typename t >
using seqan3::innermost_value_type_t = typedef typename innermost_value_type<t>::type

◆ iterator_tag_t

template<typename it_t >
using seqan3::iterator_tag_t = typedef typename iterator_tag<it_t>::type

Return the iterator_category type of the input type (transformation_trait shortcut).

Template Parameters
it_tThe type to operate on.
See also
seqan3::iterator_tag

◆ reference_t

template<typename t >
using seqan3::reference_t = typedef typename reference<t>::type

Shortcut for seqan3::reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::reference

◆ remove_cvref_t

template<typename t >
using seqan3::remove_cvref_t = typedef std::remove_cv_t<std::remove_reference_t<t> >

Return the input type with const, volatile and references removed (type trait).

Template Parameters
tThe type to operate on.

◆ remove_rvalue_reference_t

template<typename t >
using seqan3::remove_rvalue_reference_t = typedef typename remove_rvalue_reference<t>::type

Return the input type with && removed, but lvalue references preserved (transformation_trait shortcut).

Template Parameters
tThe type to operate on.
See also
seqan3::remove_rvalue_reference

◆ rvalue_reference_t

template<typename t >
using seqan3::rvalue_reference_t = typedef typename rvalue_reference<t>::type

Shortcut for seqan3::rvalue_reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::rvalue_reference

◆ size_type_t

template<typename t >
using seqan3::size_type_t = typedef typename size_type<t>::type

Shortcut for seqan3::size_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::size_type

◆ value_type_t

template<typename t >
using seqan3::value_type_t = typedef typename value_type<t>::type

Shortcut for seqan3::value_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::value_type

Variable Documentation

◆ dimension_v

template<typename t >
constexpr size_t seqan3::dimension_v = 1

Returns the number of times you can call seqan3::value_type_t recursively on t (type trait).

Template Parameters
tThe type to be queried; must resolve seqan3::value_type_t at least once.

Attention, this type trait implicitly removes cv-qualifiers and reference from the types it recurses on and returns.

◆ is_constexpr_default_constructible_v

template<typename t >
template<typename t >
constexpr bool is_constexpr_default_constructible_v = is_constexpr_default_constructible<t>::value
related

Whether a type std::is_default_constructible in constexpr-context (unary_type_trait shortcut).

Template Parameters
tThe type to operate on.