Variable templates for type traits
Utilities » Metaprogramming
Collaboration diagram for Variable templates for type traits:

## Variables

template<typename _Tp >
constexpr bool | std::has_unique_object_representations_v
template<typename _Tp >
constexpr bool | std::is_aggregate_v
template<typename _Tp >
constexpr bool | std::is_bounded_array_v
template<typename _Tp , typename _Up >
constexpr bool | std::is_layout_compatible_v
template<typename _Base , typename _Derived >
constexpr bool | std::is_pointer_interconvertible_base_of_v
template<typename _Tp >
constexpr bool | std::is_unbounded_array_v
template<typename... _Bn>
constexpr bool | std::conjunction_v
template<typename... _Bn>
constexpr bool | std::disjunction_v
template<typename _Pp >
constexpr bool | std::negation_v
template<typename _Tp >
constexpr bool | std::is_void_v
template<typename _Tp >
constexpr bool | std::is_null_pointer_v
template<typename _Tp >
constexpr bool | std::is_integral_v
template<typename _Tp >
constexpr bool | std::is_floating_point_v
template<typename _Tp >
constexpr bool | std::is_array_v
template<typename _Tp >
constexpr bool | std::is_array_v< _Tp[]>
template<typename _Tp , size_t _Num>
constexpr bool | std::is_array_v< _Tp[_Num]>
template<typename _Tp >
constexpr bool | std::is_pointer_v
template<typename _Tp >
constexpr bool | std::is_lvalue_reference_v
template<typename _Tp >
constexpr bool | std::is_lvalue_reference_v< _Tp & >
template<typename _Tp >
constexpr bool | std::is_rvalue_reference_v
template<typename _Tp >
constexpr bool | std::is_rvalue_reference_v< _Tp && >
template<typename _Tp >
constexpr bool | std::is_member_object_pointer_v
template<typename _Tp >
constexpr bool | std::is_member_function_pointer_v
template<typename _Tp >
constexpr bool | std::is_enum_v
template<typename _Tp >
constexpr bool | std::is_union_v
template<typename _Tp >
constexpr bool | std::is_class_v
template<typename _Tp >
constexpr bool | std::is_function_v
template<typename _Tp >
constexpr bool | std::is_reference_v
template<typename _Tp >
constexpr bool | std::is_reference_v< _Tp & >
template<typename _Tp >
constexpr bool | std::is_reference_v< _Tp && >
template<typename _Tp >
constexpr bool | std::is_arithmetic_v
template<typename _Tp >
constexpr bool | std::is_fundamental_v
template<typename _Tp >
constexpr bool | std::is_object_v
template<typename _Tp >
constexpr bool | std::is_scalar_v
template<typename _Tp >
constexpr bool | std::is_compound_v
template<typename _Tp >
constexpr bool | std::is_member_pointer_v
template<typename _Tp >
constexpr bool | std::is_const_v
template<typename _Tp >
constexpr bool | std::is_const_v< const _Tp >
template<typename _Tp >
constexpr bool | std::is_volatile_v
template<typename _Tp >
constexpr bool | std::is_volatile_v< volatile _Tp >
template<typename _Tp >
constexpr bool | std::is_trivial_v
template<typename _Tp >
constexpr bool | std::is_trivially_copyable_v
template<typename _Tp >
constexpr bool | std::is_standard_layout_v
template<typename _Tp >
constexpr bool | std::is_pod_v
template<typename _Tp >
constexpr bool | std::is_literal_type_v
template<typename _Tp >
constexpr bool | std::is_empty_v
template<typename _Tp >
constexpr bool | std::is_polymorphic_v
template<typename _Tp >
constexpr bool | std::is_abstract_v
template<typename _Tp >
constexpr bool | std::is_final_v
template<typename _Tp >
constexpr bool | std::is_signed_v
template<typename _Tp >
constexpr bool | std::is_unsigned_v
template<typename _Tp , typename... _Args>
constexpr bool | std::is_constructible_v
template<typename _Tp >
constexpr bool | std::is_default_constructible_v
template<typename _Tp >
constexpr bool | std::is_copy_constructible_v
template<typename _Tp >
constexpr bool | std::is_move_constructible_v
template<typename _Tp , typename _Up >
constexpr bool | std::is_assignable_v
template<typename _Tp >
constexpr bool | std::is_copy_assignable_v
template<typename _Tp >
constexpr bool | std::is_move_assignable_v
template<typename _Tp >
constexpr bool | std::is_destructible_v
template<typename _Tp , typename... _Args>
constexpr bool | std::is_trivially_constructible_v
template<typename _Tp >
constexpr bool | std::is_trivially_default_constructible_v
template<typename _Tp >
constexpr bool | std::is_trivially_copy_constructible_v
template<typename _Tp >
constexpr bool | std::is_trivially_move_constructible_v
template<typename _Tp , typename _Up >
constexpr bool | std::is_trivially_assignable_v
template<typename _Tp >
constexpr bool | std::is_trivially_copy_assignable_v
template<typename _Tp >
constexpr bool | std::is_trivially_move_assignable_v
template<typename _Tp >
constexpr bool | std::is_trivially_destructible_v
template<typename _Tp , typename... _Args>
constexpr bool | std::is_nothrow_constructible_v
template<typename _Tp >
constexpr bool | std::is_nothrow_default_constructible_v
template<typename _Tp >
constexpr bool | std::is_nothrow_copy_constructible_v
template<typename _Tp >
constexpr bool | std::is_nothrow_move_constructible_v
template<typename _Tp , typename _Up >
constexpr bool | std::is_nothrow_assignable_v
template<typename _Tp >
constexpr bool | std::is_nothrow_copy_assignable_v
template<typename _Tp >
constexpr bool | std::is_nothrow_move_assignable_v
template<typename _Tp >
constexpr bool | std::is_nothrow_destructible_v
template<typename _Tp >
constexpr bool | std::has_virtual_destructor_v
template<typename _Tp >
constexpr size_t | std::alignment_of_v
template<typename _Tp >
constexpr size_t | std::rank_v
template<typename _Tp , size_t _Size>
constexpr size_t | std::rank_v< _Tp[_Size]>
template<typename _Tp >
constexpr size_t | std::rank_v< _Tp[]>
template<typename _Tp , unsigned _Idx = 0>
constexpr size_t | std::extent_v
template<typename _Tp , size_t _Size>
constexpr size_t | std::extent_v< _Tp[_Size], 0 >
template<typename _Tp , unsigned _Idx, size_t _Size>
constexpr size_t | std::extent_v< _Tp[_Size], _Idx >
template<typename _Tp >
constexpr size_t | std::extent_v< _Tp[], 0 >
template<typename _Tp , unsigned _Idx>
constexpr size_t | std::extent_v< _Tp[], _Idx >
template<typename _Tp , typename _Up >
constexpr bool | std::is_same_v
template<typename _Tp >
constexpr bool | std::is_same_v< _Tp, _Tp >
template<typename _Base , typename _Derived >
constexpr bool | std::is_base_of_v
template<typename _From , typename _To >
constexpr bool | std::is_convertible_v
template<typename _Fn , typename... _Args>
constexpr bool | std::is_invocable_v
template<typename _Fn , typename... _Args>
constexpr bool | std::is_nothrow_invocable_v
template<typename _Ret , typename _Fn , typename... _Args>
constexpr bool | std::is_invocable_r_v
template<typename _Ret , typename _Fn , typename... _Args>
constexpr bool | std::is_nothrow_invocable_r_v

## Detailed Description

Each variable `is_xxx_v<T>` is a boolean constant with the same value as the `value` member of the corresponding type trait `is_xxx<T>`.

Since
  C++17 unless noted otherwise.

## Variable Documentation

## alignment_of_v

template<typename _Tp >

constexpr size_t std::alignment_of_v

inline constexpr

Definition at line 3331 of file type_traits.

## conjunction_v

template<typename... _Bn>

constexpr bool std::conjunction_v

inline constexpr

Definition at line 245 of file type_traits.

## disjunction_v

template<typename... _Bn>

constexpr bool std::disjunction_v

inline constexpr

Definition at line 248 of file type_traits.

## extent_v

template<typename _Tp , unsigned _Idx = 0>

constexpr size_t std::extent_v

inline constexpr

Definition at line 3341 of file type_traits.

## extent_v< _Tp[], 0 >

template<typename _Tp >

constexpr size_t std::extent_v< _Tp[], 0 >

inline constexpr

Definition at line 3347 of file type_traits.

## extent_v< _Tp[], _Idx >

template<typename _Tp , unsigned _Idx>

constexpr size_t std::extent_v< _Tp[], _Idx >

inline constexpr

Definition at line 3349 of file type_traits.

## extent_v< _Tp[_Size], 0 >

template<typename _Tp , size_t _Size>

constexpr size_t std::extent_v< _Tp[_Size], 0 >

inline constexpr

Definition at line 3343 of file type_traits.

## extent_v< _Tp[_Size], _Idx >

template<typename _Tp , unsigned _Idx, size_t _Size>

constexpr size_t std::extent_v< _Tp[_Size], _Idx >

inline constexpr

Definition at line 3345 of file type_traits.

## has_unique_object_representations_v

template<typename _Tp >

constexpr bool std::has_unique_object_representations_v

inline constexpr

Definition at line 3398 of file type_traits.

## has_virtual_destructor_v

template<typename _Tp >

constexpr bool std::has_virtual_destructor_v

inline constexpr

Definition at line 3327 of file type_traits.

## is_abstract_v

template<typename _Tp >

constexpr bool std::is_abstract_v

inline constexpr

Definition at line 3239 of file type_traits.

## is_aggregate_v

template<typename _Tp >

constexpr bool std::is_aggregate_v

inline constexpr

is_aggregate_v - true if the type is an aggregate.

Since
  C++17

Definition at line 3416 of file type_traits.

## is_arithmetic_v

template<typename _Tp >

constexpr bool std::is_arithmetic_v

inline constexpr

Definition at line 3202 of file type_traits.

## is_array_v

template<typename _Tp >

constexpr bool std::is_array_v

inline constexpr

Definition at line 3165 of file type_traits.

## is_array_v< _Tp[]>

template<typename _Tp >

constexpr bool std::is_array_v< _Tp[]>

inline constexpr

Definition at line 3167 of file type_traits.

## is_array_v< _Tp[_Num]>

template<typename _Tp , size_t _Num>

constexpr bool std::is_array_v< _Tp[_Num]>

inline constexpr

Definition at line 3169 of file type_traits.

## is_assignable_v

template<typename _Tp , typename _Up >

constexpr bool std::is_assignable_v

inline constexpr

Definition at line 3260 of file type_traits.

## is_base_of_v

template<typename _Base , typename _Derived >

constexpr bool std::is_base_of_v

inline constexpr

Definition at line 3361 of file type_traits.

## is_bounded_array_v

template<typename _Tp >

constexpr bool std::is_bounded_array_v

inline constexpr

True for a type that is an array of known bound.

Since
  C++20

Definition at line 3495 of file type_traits.

## is_class_v

template<typename _Tp >

constexpr bool std::is_class_v

inline constexpr

Definition at line 3192 of file type_traits.

## is_compound_v

template<typename _Tp >

constexpr bool std::is_compound_v

inline constexpr

Definition at line 3210 of file type_traits.

## is_const_v

template<typename _Tp >

constexpr bool std::is_const_v

inline constexpr

Definition at line 3214 of file type_traits.

## is_const_v< const _Tp >

template<typename _Tp >

constexpr bool std::is_const_v< const _Tp >

inline constexpr

Definition at line 3216 of file type_traits.

## is_constructible_v

template<typename _Tp , typename... _Args>

constexpr bool std::is_constructible_v

inline constexpr

Definition at line 3249 of file type_traits.

## is_convertible_v

template<typename _From , typename _To >

constexpr bool std::is_convertible_v

inline constexpr

Definition at line 3364 of file type_traits.

## is_copy_assignable_v

template<typename _Tp >

constexpr bool std::is_copy_assignable_v

inline constexpr

Definition at line 3262 of file type_traits.

## is_copy_constructible_v

template<typename _Tp >

constexpr bool std::is_copy_constructible_v

inline constexpr

Definition at line 3253 of file type_traits.

## is_default_constructible_v

template<typename _Tp >

constexpr bool std::is_default_constructible_v

inline constexpr

Definition at line 3251 of file type_traits.

## is_destructible_v

template<typename _Tp >

constexpr bool std::is_destructible_v

inline constexpr

Definition at line 3269 of file type_traits.

## is_empty_v

template<typename _Tp >

constexpr bool std::is_empty_v

inline constexpr

Definition at line 3235 of file type_traits.

## is_enum_v

template<typename _Tp >

constexpr bool std::is_enum_v

inline constexpr

Definition at line 3188 of file type_traits.

## is_final_v

template<typename _Tp >

constexpr bool std::is_final_v

inline constexpr

Definition at line 3241 of file type_traits.

## is_floating_point_v

template<typename _Tp >

constexpr bool std::is_floating_point_v

inline constexpr

Definition at line 3162 of file type_traits.

## is_function_v

template<typename _Tp >

constexpr bool std::is_function_v

inline constexpr

Definition at line 3194 of file type_traits.

## is_fundamental_v

template<typename _Tp >

constexpr bool std::is_fundamental_v

inline constexpr

Definition at line 3204 of file type_traits.

## is_integral_v

template<typename _Tp >

constexpr bool std::is_integral_v

inline constexpr

Definition at line 3160 of file type_traits.

## is_invocable_r_v

template<typename _Ret , typename _Fn , typename... _Args>

constexpr bool std::is_invocable_r_v

inline constexpr

Definition at line 3375 of file type_traits.

## is_invocable_v

template<typename _Fn , typename... _Args>

constexpr bool std::is_invocable_v

inline constexpr

Definition at line 3370 of file type_traits.

## is_layout_compatible_v

template<typename _Tp , typename _Up >

constexpr bool std::is_layout_compatible_v

constexpr

Since
  C++20

Definition at line 3534 of file type_traits.

## is_literal_type_v

template<typename _Tp >

constexpr bool std::is_literal_type_v

inline constexpr

Definition at line 3233 of file type_traits.

## is_lvalue_reference_v

template<typename _Tp >

constexpr bool std::is_lvalue_reference_v

inline constexpr

Definition at line 3174 of file type_traits.

## is_lvalue_reference_v< _Tp & >

template<typename _Tp >

constexpr bool std::is_lvalue_reference_v< _Tp & >

inline constexpr

Definition at line 3176 of file type_traits.

## is_member_function_pointer_v

template<typename _Tp >

constexpr bool std::is_member_function_pointer_v

inline constexpr

Definition at line 3185 of file type_traits.

## is_member_object_pointer_v

template<typename _Tp >

constexpr bool std::is_member_object_pointer_v

inline constexpr

Definition at line 3182 of file type_traits.

## is_member_pointer_v

template<typename _Tp >

constexpr bool std::is_member_pointer_v

inline constexpr

Definition at line 3212 of file type_traits.

## is_move_assignable_v

template<typename _Tp >

constexpr bool std::is_move_assignable_v

inline constexpr

Definition at line 3265 of file type_traits.

## is_move_constructible_v

template<typename _Tp >

constexpr bool std::is_move_constructible_v

inline constexpr

Definition at line 3256 of file type_traits.

## is_nothrow_assignable_v

template<typename _Tp , typename _Up >

constexpr bool std::is_nothrow_assignable_v

inline constexpr

Definition at line 3312 of file type_traits.

## is_nothrow_constructible_v

template<typename _Tp , typename... _Args>

constexpr bool std::is_nothrow_constructible_v

inline constexpr

Definition at line 3299 of file type_traits.

## is_nothrow_copy_assignable_v

template<typename _Tp >

constexpr bool std::is_nothrow_copy_assignable_v

inline constexpr

Definition at line 3315 of file type_traits.

## is_nothrow_copy_constructible_v

template<typename _Tp >

constexpr bool std::is_nothrow_copy_constructible_v

inline constexpr

Definition at line 3305 of file type_traits.

## is_nothrow_default_constructible_v

template<typename _Tp >

constexpr bool std::is_nothrow_default_constructible_v

inline constexpr

Definition at line 3302 of file type_traits.

## is_nothrow_destructible_v

template<typename _Tp >

constexpr bool std::is_nothrow_destructible_v

inline constexpr

Definition at line 3323 of file type_traits.

## is_nothrow_invocable_r_v

template<typename _Ret , typename _Fn , typename... _Args>

constexpr bool std::is_nothrow_invocable_r_v

inline constexpr

Definition at line 3378 of file type_traits.

## is_nothrow_invocable_v

template<typename _Fn , typename... _Args>

constexpr bool std::is_nothrow_invocable_v

inline constexpr

Definition at line 3372 of file type_traits.

## is_nothrow_move_assignable_v

template<typename _Tp >

constexpr bool std::is_nothrow_move_assignable_v

inline constexpr

Definition at line 3319 of file type_traits.

## is_nothrow_move_constructible_v

template<typename _Tp >

constexpr bool std::is_nothrow_move_constructible_v

inline constexpr

Definition at line 3308 of file type_traits.

## is_null_pointer_v

template<typename _Tp >

constexpr bool std::is_null_pointer_v

inline constexpr

Definition at line 3158 of file type_traits.

## is_object_v

template<typename _Tp >

constexpr bool std::is_object_v

inline constexpr

Definition at line 3206 of file type_traits.

## is_pod_v

template<typename _Tp >

constexpr bool std::is_pod_v

inline constexpr

Definition at line 3230 of file type_traits.

## is_pointer_interconvertible_base_of_v

template<typename _Base , typename _Derived >

constexpr bool std::is_pointer_interconvertible_base_of_v

constexpr

Since
  C++20

Definition at line 3559 of file type_traits.

## is_pointer_v

template<typename _Tp >

constexpr bool std::is_pointer_v

inline constexpr

Definition at line 3172 of file type_traits.

## is_polymorphic_v

template<typename _Tp >

constexpr bool std::is_polymorphic_v

inline constexpr

Definition at line 3237 of file type_traits.

## is_reference_v

template<typename _Tp >

constexpr bool std::is_reference_v

inline constexpr

Definition at line 3196 of file type_traits.

## is_reference_v< _Tp & >

template<typename _Tp >

constexpr bool std::is_reference_v< _Tp & >

inline constexpr

Definition at line 3198 of file type_traits.

## is_reference_v< _Tp && >

template<typename _Tp >

constexpr bool std::is_reference_v< _Tp && >

inline constexpr

Definition at line 3200 of file type_traits.

## is_rvalue_reference_v

template<typename _Tp >

constexpr bool std::is_rvalue_reference_v

inline constexpr

Definition at line 3178 of file type_traits.

## is_rvalue_reference_v< _Tp && >

template<typename _Tp >

constexpr bool std::is_rvalue_reference_v< _Tp && >

inline constexpr

Definition at line 3180 of file type_traits.

## is_same_v

template<typename _Tp , typename _Up >

constexpr bool std::is_same_v

inline constexpr

Definition at line 3356 of file type_traits.

## is_same_v< _Tp, _Tp >

template<typename _Tp >

constexpr bool std::is_same_v< _Tp, _Tp >

inline constexpr

Definition at line 3358 of file type_traits.

## is_scalar_v

template<typename _Tp >

constexpr bool std::is_scalar_v

inline constexpr

Definition at line 3208 of file type_traits.

## is_signed_v

template<typename _Tp >

constexpr bool std::is_signed_v

inline constexpr

Definition at line 3244 of file type_traits.

## is_standard_layout_v

template<typename _Tp >

constexpr bool std::is_standard_layout_v

inline constexpr

Definition at line 3227 of file type_traits.

## is_trivial_v

template<typename _Tp >

constexpr bool std::is_trivial_v

inline constexpr

Definition at line 3223 of file type_traits.

## is_trivially_assignable_v

template<typename _Tp , typename _Up >

constexpr bool std::is_trivially_assignable_v

inline constexpr

Definition at line 3285 of file type_traits.

## is_trivially_constructible_v

template<typename _Tp , typename... _Args>

constexpr bool std::is_trivially_constructible_v

inline constexpr

Definition at line 3272 of file type_traits.

## is_trivially_copy_assignable_v

template<typename _Tp >

constexpr bool std::is_trivially_copy_assignable_v

inline constexpr

Definition at line 3288 of file type_traits.

## is_trivially_copy_constructible_v

template<typename _Tp >

constexpr bool std::is_trivially_copy_constructible_v

inline constexpr

Definition at line 3278 of file type_traits.

## is_trivially_copyable_v

template<typename _Tp >

constexpr bool std::is_trivially_copyable_v

inline constexpr

Definition at line 3225 of file type_traits.

## is_trivially_default_constructible_v

template<typename _Tp >

constexpr bool std::is_trivially_default_constructible_v

inline constexpr

Definition at line 3275 of file type_traits.

## is_trivially_destructible_v

template<typename _Tp >

constexpr bool std::is_trivially_destructible_v

inline constexpr

Definition at line 3296 of file type_traits.

## is_trivially_move_assignable_v

template<typename _Tp >

constexpr bool std::is_trivially_move_assignable_v

inline constexpr

Definition at line 3292 of file type_traits.

## is_trivially_move_constructible_v

template<typename _Tp >

constexpr bool std::is_trivially_move_constructible_v

inline constexpr

Definition at line 3281 of file type_traits.

## is_unbounded_array_v

template<typename _Tp >

constexpr bool std::is_unbounded_array_v

inline constexpr

True for a type that is an array of unknown bound.

Since
  C++20

Definition at line 3504 of file type_traits.

## is_union_v

template<typename _Tp >

constexpr bool std::is_union_v

inline constexpr

Definition at line 3190 of file type_traits.

## is_unsigned_v

template<typename _Tp >

constexpr bool std::is_unsigned_v

inline constexpr

Definition at line 3246 of file type_traits.

## is_void_v

template<typename _Tp >

constexpr bool std::is_void_v

inline constexpr

Definition at line 3156 of file type_traits.

## is_volatile_v

template<typename _Tp >

constexpr bool std::is_volatile_v

inline constexpr

Definition at line 3218 of file type_traits.

## is_volatile_v< volatile _Tp >

template<typename _Tp >

constexpr bool std::is_volatile_v< volatile _Tp >

inline constexpr

Definition at line 3220 of file type_traits.

## negation_v

template<typename _Pp >

constexpr bool std::negation_v

inline constexpr

Definition at line 251 of file type_traits.

## rank_v

template<typename _Tp >

constexpr size_t std::rank_v

inline constexpr

Definition at line 3334 of file type_traits.

## rank_v< _Tp[]>

template<typename _Tp >

constexpr size_t std::rank_v< _Tp[]>

inline constexpr

Definition at line 3338 of file type_traits.

## rank_v< _Tp[_Size]>

template<typename _Tp , size_t _Size>

constexpr size_t std::rank_v< _Tp[_Size]>

inline constexpr

Definition at line 3336 of file type_traits.