C++11 provides two type trait template classes: std::is_integer
and std::is_integral
. However, I cannot tell the differences between them.
The difference is that std::is_integral
will only recognize decimal integers including bool
char
char16_t
char32_t
wchar_t
short
int
long
long long
. While std::numeric_limits
will recognize all of those aswell as float
double
. Look at these two pages for more information: is_integer, is_integral