https://issues.dlang.org/show_bug.cgi?id=20205

Dominikus Dittes Scherkl <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Dominikus Dittes Scherkl <[email protected]> ---
Use better implementation of abs:

/// get the absolute value of x as unsigned type. always succeeds, even for
T.min
Unsigned!T abs(T)(const(T) x) if(isIntegral!T)
{
   static if(isSigned!T) if(x < 0) return -x;
   return x;
}

--

Reply via email to