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

          Issue ID: 17705
           Summary: std.math.isFinite cannot run at compile-time
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nob...@puremagic.com
          Reporter: lt.infiltra...@gmail.com

----
import std.math : isFinite;
enum test = isFinite(15.0);
----

>From what I understand from ketmar, the issue is that the CTFE allows casting
of floating types only to the same size, but isFinite casts it to ushort.  This
can be solved for float and double by using uint and ulong, respectively; but I
do not know how to make it work real, unless we allow casting to a
struct/array.

--

Reply via email to