[Issue 17705] New: std.math.isFinite cannot run at compile-time
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 30 22:38:01 PDT 2017
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: nobody at puremagic.com
Reporter: lt.infiltrator at 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.
--
More information about the Digitalmars-d-bugs
mailing list