4.4.0
|
|
Freundlich's C++ toolkit |
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< 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. | |
template<typename Container > | |
using | fcppt::type_traits::value_type = typename Container::value_type |
The value type of a container. | |
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
.
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.
Iterator | Must be an iterator type |
Category | Must be an iterator category |
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.
using fcppt::type_traits::value_type = typedef typename Container::value_type |
The value type of a container.