4.3.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Classes | Typedefs
fcppt.type_traits

Description

Some additional type traits.

Classes

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_string< Type >
 Tells if a type is a string. More...
 

Typedefs

template<typename Type >
using fcppt::type_traits::is_integral_constant = typename fcppt::type_traits::detail::is_integral_constant< Type >::type
 Checks if a type is a std::integral_constant. 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 Container >
using fcppt::type_traits::value_type = typename Container::value_type
 The value type of a container. More...
 

Typedef Documentation

◆ is_integral_constant

template<typename Type >
using fcppt::type_traits::is_integral_constant = typedef typename fcppt::type_traits::detail::is_integral_constant<Type>::type

Checks if a type is a std::integral_constant.

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

◆ value_type

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

The value type of a container.