[Issue 7691] A pure std.math.floor
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jan 26 19:00:53 PST 2015
https://issues.dlang.org/show_bug.cgi?id=7691
AndyC <andy at squeakycode.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andy at squeakycode.net
--- Comment #5 from AndyC <andy at squeakycode.net> ---
In dmd 2.066.1, I get:
$ dmd test.d
/usr/include/dmd/phobos/std/math.d(4183): Error: Cannot convert &double to
ulong* at compile time
/usr/include/dmd/phobos/std/math.d(3288): called from here: isNaN(x)
test.d(4): called from here: floor(2.3)
Any reason it has to be enum? Changing it to either const or immutable
compiles fine:
pure void main() {
const double x = floor(2.3);
}
--
More information about the Digitalmars-d-bugs
mailing list