static assert( isFloatingPoint!float && isFloatingPoint!double && isFloatingPoint!real && isFloatingPoint!(const(real)) && isFloatingPoint!(immutable(real)) ); static assert(!isFloatingPoint!int); // types which act as floating point values do not pass struct S { float val; alias val this; } static assert(!isFloatingPoint!S);
Detect whether T is a built-in floating point type.
See also: __traits(isFloating, T)