On 24/08/13 14:50, Joseph Rushton Wakeling wrote:
     static if (isNumeric!T)
     {
         return std.math.isNaN(t);
     }

Note that the correct if () condition here depends on how you want your isNaN to behave in certain cases. Using isNumeric will mean isNaN('c') returns true. If you want isNaN to return false when passed a char type, use your if(is(T : real)) instead.

Reply via email to