VCCC  2024.05
VisualCamp Common C++ library
type_traits

Implementation of STL header <type_traits> with some extra features. More...

Detailed Description

Modules

 are
 specialized conjunction
 
 arity
 get function arity
 
 bigger_type
 get biggest type among template parameters
 
 vccc::common_type
 determines the common type of a group of types
 
 is_list_initializable
 checks if a type can be initialized from the other type using direct-list-initialization
 
 is_copy_list_initializable
 checks if a type can be initialized from the other type using copy-list-initialization
 
 is_printable
 check if a type is default printable
 
 is_range
 check if a type is range(deprecated)
 
 is_specialization
 check if a type is specialization of another type
 
 
 is_iterator
 check if a type is a iterable type(deprecated)
 
 remove_cvref
 combines std::remove_cv and std::remove_reference
 
 type_identity
 returns the type argument unchanged
 
 bool_constant
 compile-time constant of specified type with specified value
 
 common_reference
 determines the common reference type of a group of types
 
 conjunction
 
 disjunction
 
 is_bounded_array
 
 is_class_or_enum
 
 is_invocable, is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r
 checks if a type can be invoked (as if by vccc::invoke) with the given argument types
 
 is_unbounded_array
 
 negation
 
 multiples_of
 
 is_odd
 
 is_even
 
 static_max
 Get max value in compile-time.
 
 static_min
 Get min value in compile-time.
 
 void_t
 void variadic alias template
 

Classes

struct  copy_const< From, To >
 
struct  copy_const< const From, To >
 
struct  copy_volatile< From, To >
 
struct  copy_volatile< volatile From, To >
 
struct  copy_cv< From, To >
 
struct  copy_reference< From, To >
 
struct  copy_reference< From &, To >
 
struct  copy_reference< From &&, To >
 
struct  copy_cvref< From, To >
 
struct  copy_template< From, To, Proj >
 
struct  copy_template< From< T... >, To, Proj >
 
struct  has_operator_arrow< T, typename >
 
struct  has_operator_arrow< T, void_t< decltype(std::declval< T >().operator->())> >
 
struct  has_typename_difference_type< T, typename >
 
struct  has_typename_difference_type< T, void_t< typename T::difference_type > >
 
struct  has_typename_element_type< T, typename >
 
struct  has_typename_element_type< T, void_t< typename T::element_type > >
 
struct  has_typename_type< T, typename >
 
struct  has_typename_type< T, void_t< typename T::type > >
 
struct  has_typename_value_type< T, typename >
 
struct  has_typename_value_type< T, void_t< typename T::value_type > >
 
struct  is_character< T >
 Check if type is character type. More...
 
struct  is_explicitly_constructible< T, Args >
 
struct  is_explicitly_convertible< From, To, typename >
 
struct  is_explicitly_convertible< From, To, void_t< decltype(static_cast< To >(std::declval< From >()))> >
 
struct  is_implicitly_constructible< T, Args >
 
struct  is_initializer_list< T >
 
struct  is_integer_like< T >
 Check if type models integer-like type (C++ 20 requirement) More...
 
struct  is_signed_integer_like< T >
 
struct  is_unsigned_integer_like< T >
 
struct  invoke_result< F, Args >
 deduces the result type of invoking a callable object with a set of arguments More...
 
struct  is_nothrow_convertible< From, To >
 
struct  is_referencable< T, typename >
 
struct  is_referencable< T, void_t< T & > >
 
struct  is_swappable< T >
 
struct  is_nothrow_swappable< T >
 
struct  is_swappable_with< T, U >
 
struct  is_nothrow_swappable_with< T, U >
 
struct  is_tuple_like< T, typename >
 Check if type is tuple-like(deprecated. Use tuple_like instead) More...
 
struct  is_tuple_like< T, void_t< decltype(std::tuple_size< T >::value)> >
 
struct  lossless_type_add<... >
 
struct  lossless_type_mul<... >
 
struct  lossless_type_div<... >
 
struct  simple_common_reference< T1, T2 >
 
struct  simple_common_reference< T1 &, T2 & >
 
struct  simple_common_reference< T1 &&, T2 && >
 
struct  simple_common_reference< A &, B && >
 
struct  simple_common_reference< B &&, A & >
 
struct  template_arity< C, MaxSize >
 get template parameter count of template class More...
 
struct  mandatory_template_arity< C >
 get mandatory template parameter count of template class More...
 
struct  default_template_arity< C, MaxSize >
 get default template parameter count of template class More...
 

Typedefs

template<typename From , typename To >
using copy_const_t = typename copy_const< From, To >::type
 
template<typename From , typename To >
using copy_volatile_t = typename copy_volatile< From, To >::type
 
template<typename From , typename To >
using copy_cv_t = typename copy_cv< From, To >::type
 
template<typename From , typename To >
using copy_reference_t = typename copy_reference< From, To >::type
 
template<typename From , typename To >
using copy_cvref_t = typename copy_cvref< From, To >::type
 
template<typename From , template< typename... > class To, template< typename, typename... > class Proj = type_identity_t>
using copy_template_t = typename copy_template< From, To, Proj >::type
 
template<class T >
using is_complete = decltype(detail::is_complete_impl(std::declval< T * >()))
 
template<typename T , typename... Args>
using is_explicitly_constructible_t = typename is_explicitly_constructible< T, Args... >::type
 
template<typename T , typename... Args>
using is_implicitly_constructible_t = typename is_implicitly_constructible< T, Args... >::type
 
template<typename F , typename ... Args>
using invoke_result_t = typename invoke_result< F, Args... >::type
 
template<typename ... Types>
using decay_if_float_t = typename std::conditional_t< conjunction< std::is_same< Types, float >... >::value, float, double >
 
template<typename ... Ts>
using lossless_type_add_t = typename lossless_type_add< Ts... >::type
 
template<typename ... Ts>
using lossless_type_mul_t = typename lossless_type_mul< Ts... >::type
 
template<typename ... Ts>
using lossless_type_div_t = typename lossless_type_div< Ts... >::type
 
template<bool Const, typename V >
using maybe_const = std::conditional_t< Const, const V, V >
 

Typedef Documentation

◆ copy_const_t

using copy_const_t = typename copy_const<From, To>::type

◆ copy_cv_t

using copy_cv_t = typename copy_cv<From, To>::type

◆ copy_cvref_t

using copy_cvref_t = typename copy_cvref<From, To>::type

◆ copy_reference_t

using copy_reference_t = typename copy_reference<From, To>::type

◆ copy_template_t

using copy_template_t = typename copy_template<From, To, Proj>::type

◆ copy_volatile_t

using copy_volatile_t = typename copy_volatile<From, To>::type

◆ decay_if_float_t

using decay_if_float_t = typename std::conditional_t<conjunction<std::is_same<Types, float>...>::value, float, double>

◆ invoke_result_t

using invoke_result_t = typename invoke_result<F, Args...>::type

◆ is_complete

using is_complete = decltype(detail::is_complete_impl(std::declval<T*>()))

◆ is_explicitly_constructible_t

using is_explicitly_constructible_t = typename is_explicitly_constructible<T, Args...>::type

◆ is_implicitly_constructible_t

using is_implicitly_constructible_t = typename is_implicitly_constructible<T, Args...>::type

◆ lossless_type_add_t

using lossless_type_add_t = typename lossless_type_add<Ts...>::type

◆ lossless_type_div_t

using lossless_type_div_t = typename lossless_type_div<Ts...>::type

◆ lossless_type_mul_t

using lossless_type_mul_t = typename lossless_type_mul<Ts...>::type

◆ maybe_const

using maybe_const = std::conditional_t<Const, const V, V>