std::numeric_limits::is_integer
STD::数字[医]限制::IS[医]整型
static const bool is_integer; | | (until C++11) |
---|---|---|
static constexpr bool is_integer; | | (since C++11) |
价值std::numeric_limits<T>::is_integer是true对于所有整数算术类型T和false否则。这个常量对于所有的专门化都是有意义的。
标准专业化
T | value of std::numeric_limits |
---|---|
/* non-specialized */ | false |
bool | true |
char | true |
signed char | true |
unsigned char | true |
wchar_t | true |
char16_t | true |
char32_t | true |
short | true |
unsigned short | true |
int | true |
unsigned int | true |
long | true |
unsigned long | true |
long long | true |
unsigned long long | true |
float | false |
double | false |
long double | false |
另见
is_integral (C++11) | checks if a type is integral type (class template) |
---|---|
is_signed static | identifies signed types (public static member constant) |
is_exact static | identifies exact types (public static member constant) |
is_bounded static | identifies types that represent a finite set of values (public static member constant) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。