Difference between revisions of "Template:cpp/types/traits/is"
From cppreference.com
m (add a conditional line-break: if the length of id > 20, wrap the expr, e.g. has_unique_object_representations VS is_class.) |
m (→Helper variable template: bump wrapping cutoff value to 25.) |
||
Line 21: | Line 21: | ||
{{ddcl|since={{cpp/std max|c++17|{{{std|}}}}}|deprecated={{#if:{{{deprecated|}}}|{{#ifeq:{{cpp/std max|c++17|{{{deprecated|}}}}}|c++17|yes|{{{deprecated|}}}}}}}|removed={{#if:{{{removed|}}}|{{cpp/std max|c++17|{{{removed|}}}}}}}|1= | {{ddcl|since={{cpp/std max|c++17|{{{std|}}}}}|deprecated={{#if:{{{deprecated|}}}|{{#ifeq:{{cpp/std max|c++17|{{{deprecated|}}}}}|c++17|yes|{{{deprecated|}}}}}}}|removed={{#if:{{{removed|}}}|{{cpp/std max|c++17|{{{removed|}}}}}}}|1= | ||
template< class T > | template< class T > | ||
− | inline constexpr bool {{{1|}}}_v {{#ifeq:{{#expr:{{#len:{{{1|}}}}}> | + | inline constexpr bool {{{1|}}}_v {{#ifeq:{{#expr:{{#len:{{{1|}}}}}>25}}|0|= {{{1|}}}|= |
{{{1|}}}}}<T>::value; | {{{1|}}}}}<T>::value; | ||
}} | }} | ||
{{cpp/types/integral_constant/inherit|{{{inherit_desc|}}}}} | {{cpp/types/integral_constant/inherit|{{{inherit_desc|}}}}} |
Revision as of 05:28, 25 April 2023
Defined in header <type_traits>
|
template< class T > struct ; |
Contents |
Template parameters
T | - | a type to check |
Helper variable template
template< class T > inline constexpr bool _v =<T>::value; |
value [static] |
true if , false otherwise (public static member constant) |
Member functions
operator bool |
converts the object to bool, returns value (public member function) |
operator() (C++14) |
returns value (public member function) |
Member types
Type | Definition |
value_type
|
bool |
type
|
std::integral_constant<bool, value> |