Nordlöw:
auto pow(T)(T arg, uint n) { enum vr = __traits(valueRange, arg); static if (vr.min == vr.max) // if arg is constant
I think that unfortunately this currently can't work, you can't tell the range of the input value like that. I have explained why in one of my posts in this thread. Please try to explain me why I'm wrong.
Bye, bearophile