isNumeric

checkedint-aware wrapper for std.traits.isNumeric

template isNumeric (
T
) {}

Examples

1 foreach (T; AliasSeq!(int, ushort, double))
2     assert(isBasicNum!T && isNumeric!T);
3 
4 assert(!isBasicNum!(SmartInt!int));
5 assert( isNumeric!(SmartInt!int));
6 
7 foreach (T; AliasSeq!(int[], bool))
8     assert(!(isBasicNum!T || isNumeric!T));

Meta