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

struct  seqan3::const_reference< t >
 Exposes the const_reference of another type. More...
 
struct  seqan3::difference_type< t >
 Exposes the difference_type of another type. More...
 
struct  seqan3::function_traits< std::function< return_t(args_t...)> >
 A traits class to provide a uniform interface to the properties of a function type. 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...
 
interface  range_compatible
 Two types are "compatible" if their seqan3::range_dimension_v and their seqan3::range_innermost_value_t are the same. More...
 
struct  seqan3::range_innermost_value< t >
 Recursively determines the value_type on containers and/or iterators. More...
 
struct  seqan3::reference< 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::size_type< t >
 Exposes the size_type of another type. More...
 
interface  transformation_trait
 Concept for a transformation trait. More...
 
interface  unary_type_trait
 Concept for a unary traits type. More...
 
struct  seqan3::value_type< 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 detail::const_reference_t< t >
 Shortcut for seqan3::const_reference (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::difference_type_t = typename detail::difference_type_t< t >
 Shortcut for seqan3::difference_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::range_innermost_value_t = typename range_innermost_value< t >::type
 Shortcut for seqan3::range_innermost_value (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::reference_t = typename detail::reference_t< t >
 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 detail::rvalue_reference_t< t >
 Shortcut for seqan3::rvalue_reference (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::size_type_t = typename detail::size_type_t< t >
 Shortcut for seqan3::size_type (transformation_trait shortcut). More...
 
template<typename t >
using seqan3::value_type_t = typename detail::value_type_t< t >
 Shortcut for seqan3::value_type (transformation_trait shortcut). More...
 

Variables

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...
 
template<typename t >
constexpr size_t seqan3::range_dimension_v = 1
 Returns the number of times you can call seqan3::value_type_t recursively on t (type trait). 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 detail::const_reference_t<t>

Shortcut for seqan3::const_reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::const_reference
Deprecated:
If t models std::ranges::range use std::ranges::range_reference_t<t const> instead or if t models std::input_iterator use std::iter_reference_t<t const> instead.

◆ difference_type_t

template<typename t >
using seqan3::difference_type_t = typedef typename detail::difference_type_t<t>

Shortcut for seqan3::difference_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::difference_type
Deprecated:
If t models std::ranges::range use std::ranges::range_difference_t instead or if t models std::input_iterator use std::iter_difference_t instead.

◆ 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

◆ range_innermost_value_t

template<typename t >
using seqan3::range_innermost_value_t = typedef typename range_innermost_value<t>::type

◆ reference_t

template<typename t >
using seqan3::reference_t = typedef typename detail::reference_t<t>

Shortcut for seqan3::reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::reference
Deprecated:
If t models std::ranges::range use std::ranges::range_reference_t instead or if t models std::input_iterator use std::iter_reference_t instead.

◆ 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 detail::rvalue_reference_t<t>

Shortcut for seqan3::rvalue_reference (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::rvalue_reference
Deprecated:
If t models std::ranges::range use std::ranges::range_rvalue_reference_t instead or if t models std::input_iterator use std::iter_rvalue_reference_t instead.

◆ size_type_t

template<typename t >
using seqan3::size_type_t = typedef typename detail::size_type_t<t>

Shortcut for seqan3::size_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::size_type
Deprecated:
If t models std::ranges::range use std::ranges::size_type_t instead. If t models std::input_iterator there is no alternative. Unlike std::ranges::range_size_t, the Standard has no std::iter_size_t.

◆ value_type_t

template<typename t >
using seqan3::value_type_t = typedef typename detail::value_type_t<t>

Shortcut for seqan3::value_type (transformation_trait shortcut).

Template Parameters
tThe type you wish to query.
See also
seqan3::value_type
Deprecated:
If t models std::ranges::range use std::ranges::range_value_t instead or if t models std::input_iterator use std::iter_value_t instead.

Variable Documentation

◆ 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.

◆ range_dimension_v

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

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.