digitalmars.D.bugs - [Issue 17705] New: std.math.isFinite cannot run at compile-time
- via Digitalmars-d-bugs (22/23) Jul 30 2017 https://issues.dlang.org/show_bug.cgi?id=17705
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 puremagic.com Reporter: lt.infiltrator gmail.com ---- import std.math : isFinite; enum test = isFinite(15.0); ----From what I understand from ketmar, the issue is that the CTFE allows castingof 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. --
Jul 30 2017