4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Classes | Typedefs | Variables
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.
 
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.
 
template<typename Type >
using fcppt::type_traits::is_value = std::integral_constant< bool, !std::is_void_v< Type > &&!std::is_array_v< Type > &&!std::is_function_v< Type > &&!std::is_reference_v< Type > &&!std::is_const_v< Type > &&!std::is_volatile_v< Type > >
 Checks if the type behaves like a value type.
 
template<typename Container >
using fcppt::type_traits::value_type = typename Container::value_type
 The value type of a container.
 

Variables

template<typename Iterator , typename Category >
constexpr bool fcppt::type_traits::is_iterator_of_category_v
 Checks if an iterator models a given category.
 

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_v<Type> && !std::is_array_v<Type> && !std::is_function_v<Type> && !std::is_reference_v<Type> && !std::is_const_v<Type> && !std::is_volatile_v<Type> >

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.

Variable Documentation

◆ is_iterator_of_category_v

template<typename Iterator , typename Category >
constexpr bool fcppt::type_traits::is_iterator_of_category_v
inlineconstexpr