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


Andrej Mitrovic <andrej.mitrov...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-10-23 
16:44:27 PDT ---
One problem with this is:

    enum EF : float { C = 4.9 }
    float f = 4.9;
    EF en2 = to!EF(f);

This will fail internally if conv.to compares members via "==", because of
floating point comparison semantics.

So the question is, is this going to be a problem? If yes, should we use
approxEqual for floating point comparisons? Or maybe we should simply ban using
std.conv on enums that have a floating point base type?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to