type to test
true if T is an integral type Note: this is not the same as __traits(isIntegral)
static assert( isIntegral!byte && isIntegral!short && isIntegral!int && isIntegral!long && isIntegral!(const(long)) && isIntegral!(immutable(long)) ); static assert( !isIntegral!bool && !isIntegral!char && !isIntegral!double ); // types which act as integral values do not pass struct S { int val; alias val this; } static assert(!isIntegral!S);
Detect whether T is a built-in integral type. Integral types are byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, and enums with an integral type as its base type.