[Issue 1722] std.math.nextafter: nextafterl does not exist on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 9 16:38:44 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1722


braddr at puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #5 from braddr at puremagic.com  2007-12-09 18:38 -------
I agree strongly with the compilation failure vs runtime error.  Problem,
changing throw to static assert causes the build of phobos to fail, not user
code. :)

I can change them to a template, such as:

real nextafter()(real x, real y)
{
    version (Windows)
        static assert(false, "not implemented on windows");
    else
        return std.c.math.nextafterl(x, y);
}

Templates get to live by more flexible erroring rules.  The problem is that
it's only source compatible not link compatible with the previous,
non-template, version of the function.  That's almost certainly acceptable for
d2 at this stage of its life.


-- 



More information about the Digitalmars-d-bugs mailing list