std::numeric_limits<T>::is_integer_C++中文网

C++ 参考手册

std::numeric_limits<T>::is_integer 的值对所有整数算术类型 T 为 true ,对其他为 false 。此常量对所有特化有意义。

标准特化

 
T std::numeric_limits<T>::is_integer 的值
/* non-specialized */ false
bool true
char true
signed char true
unsigned char true
wchar_t true
char8_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

参阅