C++11 provides two type trait template classes: std::is_integer and std::is_integral. However, I cannot tell the differences between them.
std::is_integral and std::numeric_limits are NOT the same. E.g. boost::multiprecision big ints are treated differently.
This is from a corresponding issue:
is_integralreturns information about the nature of the type and is true only for "native" integer types, it should never be true for class types. Which is to sayis_integerandis_classare mutually exclusive.
numeric_limitson the other hand returns information on the behaviour of a type - whether it models a particular concept if you will - and so should be specialized for UDT's. Note that specializingis_integerfor UDTs would break code, sinceis_integerimplies that a lot of other things are also true like trivial move/copy/init etc.