static assert( isNumeric!byte && isNumeric!short && isNumeric!int && isNumeric!long && isNumeric!float && isNumeric!double && isNumeric!real && isNumeric!(const(real)) && isNumeric!(immutable(real)) ); static assert( !isNumeric!void && !isNumeric!bool && !isNumeric!char && !isNumeric!wchar && !isNumeric!dchar ); // types which act as numeric values do not pass struct S { int val; alias val this; } static assert(!isNumeric!S);
Detect whether T is a built-in numeric type (integral or floating point).