http://d.puremagic.com/issues/show_bug.cgi?id=7691
Summary: A pure std.math.floor Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-11 14:12:35 PDT --- import std.math: floor; pure void main() { enum double x = floor(2.3); } DMD 2.059head gives: test.d(3): Error: pure function 'main' cannot call impure function 'floor' ...\dmd2\src\phobos\std\math.d(1917): Error: floorl cannot be interpreted at compile time, because it has no available source code test.d(3): called from here: floor(2.3L) So there are two problems here, floor is not pure and it can't run at compile-time. std.math.fmod() too isn't pure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------