2.10.0
Freundlich's C++ toolkit
Classes | Typedefs
fcppt.type_traits

Description

Some additional type traits.

Classes

struct  fcppt::type_traits::constructible_from< Type, Args >
 Checks if a type can be constructed from certain arguments. More...
 
struct  fcppt::type_traits::is_base_of< Base, Derived >
 Like std::is_base_of, but only works on complete types. More...
 
struct  fcppt::type_traits::is_brigand_sequence< Type >
 Checks if an type is an brigand sequence. More...
 
struct  fcppt::type_traits::is_std_array< Type >
 Checks if a type is a std::array. More...
 
struct  fcppt::type_traits::is_std_tuple< Type >
 Checks if a type is a std::tuple. More...
 
struct  fcppt::type_traits::is_string< Type >
 Tells if a type is a string. More...
 

Typedefs

template<typename Type >
using fcppt::type_traits::is_float_or_double = std::integral_constant< bool, std::is_same< Type, float >::value||std::is_same< Type, double >::value >
 Checks if a type is float or double. More...
 
template<typename Iterator , typename Category >
using fcppt::type_traits::is_iterator_of_category = fcppt::iterator::category_at_least< typename std::iterator_traits< Iterator >::iterator_category, Category >
 Checks if an iterator models a given category. More...
 
template<typename Type >
using fcppt::type_traits::is_value = std::integral_constant< bool, !std::is_void< Type >::value &&!std::is_array< Type >::value &&!std::is_function< Type >::value &&!std::is_reference< Type >::value &&!std::is_const< Type >::value &&!std::is_volatile< Type >::value >
 Checks if the type behaves like a value type. More...
 
template<typename Type >
using fcppt::type_traits::remove_cv_ref = std::remove_cv< std::remove_reference_t< Type > >
 Removes references and cv qualifiers. More...
 
template<typename Type >
using fcppt::type_traits::remove_cv_ref_t = typename fcppt::type_traits::remove_cv_ref< Type >::type
 Removes references and cv qualifiers. Version without typename. More...
 
template<typename Container >
using fcppt::type_traits::value_type = typename Container::value_type
 The value type of a container. More...
 

Typedef Documentation

◆ is_float_or_double

template<typename Type >
using fcppt::type_traits::is_float_or_double = typedef std::integral_constant< bool, std::is_same< Type, float >::value || std::is_same< Type, double >::value >

Checks if a type is float or double.

Checks if Type is float or double.

Template Parameters
TypeCan be any type

◆ is_iterator_of_category

template<typename Iterator , typename Category >
using fcppt::type_traits::is_iterator_of_category = typedef fcppt::iterator::category_at_least< typename std::iterator_traits< Iterator >::iterator_category, Category >

Checks if an iterator models a given category.

Checks if Iterator models the iterator category Category. For example, a random access iterator also models a bidrectional iterator.

Template Parameters
IteratorMust be an iterator type
CategoryMust be an iterator category

◆ is_value

template<typename Type >
using fcppt::type_traits::is_value = typedef std::integral_constant< bool, !std::is_void< Type >::value && !std::is_array< Type >::value && !std::is_function< Type >::value && !std::is_reference< Type >::value && !std::is_const< Type >::value && !std::is_volatile< Type >::value >

Checks if the type behaves like a value type.

A type is a value type if it is not cv-qualified, it is not void, not an array, not a function and not a reference. In essence, value types behave normally regarding copying, moving and assignment.

◆ remove_cv_ref

template<typename Type >
using fcppt::type_traits::remove_cv_ref = typedef std::remove_cv< std::remove_reference_t< Type > >

Removes references and cv qualifiers.

Removes references and cv qualifiers from Type. It's the same as applying remove_reference, followed by remove_cv.

Template Parameters
TypeCan be any type

◆ remove_cv_ref_t

template<typename Type >
using fcppt::type_traits::remove_cv_ref_t = typedef typename fcppt::type_traits::remove_cv_ref< Type >::type

Removes references and cv qualifiers. Version without typename.

◆ value_type

template<typename Container >
using fcppt::type_traits::value_type = typedef typename Container::value_type

The value type of a container.