On Thursday, 3 August 2017 at 12:24:02 UTC, data pulverizer wrote:
import std.traits: isIntegral, isNumeric;
Are you familiar with isFloatingPoint? http://dpldocs.info/experimental-docs/std.traits.isFloatingPoint.html
if(is(T: double) && isNumeric!T)
Keep in mind that T:double here means "if T can implicitly convert to double". Since int can implicitly convert to double too, this case covers both families!
You might want to try == instead of : for a more exact match.