www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17706] New: std.math.isFinite does not compile for cdouble:

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

          Issue ID: 17706
           Summary: std.math.isFinite does not compile for cdouble: "No
                    traits support for cdouble"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: lt.infiltrator gmail.com

----
import std.math : isFinite;

void main() {
    cdouble foo = 3 + 3i;
    assert(foo.isFinite);
}
----
/opt/compilers/dmd2/include/std/math.d(330): Error: static assert "No traits
support for cdouble" /opt/compilers/dmd2/include/std/math.d(5384): instantiated
from here: floatTraits!cdouble /d598/f163.d(5): instantiated from here:
isFinite!cdouble
----

This works fine for both cfloat and creal.

--
Jul 30