Skip to content

Commit

Permalink
Fix issue 19162
Browse files Browse the repository at this point in the history
  • Loading branch information
look-at-me authored and wilzbach committed Aug 20, 2018
1 parent 3aeec9b commit 1798119
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions std/math.d
Expand Up @@ -627,10 +627,9 @@ template isDeprecatedComplex(T)
* the return type will be the same as the input;
*/
auto abs(Num)(Num x)
// workaround for https://issues.dlang.org/show_bug.cgi?id=18251
//if (!isDeprecatedComplex!Num &&
//(is(typeof(Num.init >= 0)) && is(typeof(-Num.init)) ||
//(is(Unqual!Num == short) || is(Unqual!Num == byte))))
if (!isDeprecatedComplex!Num &&
(is(typeof(Num.init >= 0)) && is(typeof(-Num.init)) ||
(is(Unqual!Num == short) || is(Unqual!Num == byte))))
{
static if (isFloatingPoint!(Num))
return fabs(x);
Expand Down

0 comments on commit 1798119

Please sign in to comment.