- Since
- C++17
Each trait in <type_traits> that has a value static data member is also available as a variable template, using the same name with a _v suffix. For example, std::is_integral_v<T> is a bool constant with the same value as std::is_integral<T>::value.
In some cases, using the variable template instead of the value member avoids instantiating the class template for the trait. This gives the compiler less work to do and can make your code compile a little faster.
◆ is_layout_compatible_v
template<typename _Tp, typename _Up>
| bool std::is_layout_compatible_v |
|
constexpr |
◆ is_pointer_interconvertible_base_of_v
template<typename _Base, typename _Derived>
| bool std::is_pointer_interconvertible_base_of_v |
|
constexpr |
◆ type_order_v
template<typename _Tp, typename _Up>
| strong_ordering std::type_order_v |
|
inlineconstexpr |