From 1798119abff6b7226ad65ce57339a26f0ab0bf4e Mon Sep 17 00:00:00 2001 From: look-at-me <42397654+look-at-me@users.noreply.github.com> Date: Tue, 14 Aug 2018 23:21:00 -0400 Subject: [PATCH] Fix issue 19162 --- std/math.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/std/math.d b/std/math.d index edbd7e6ae1a..7b2ba3e47b1 100644 --- a/std/math.d +++ b/std/math.d @@ -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);