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



--- Comment #4 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-10-24 
08:02:31 PDT ---
Or alternatively require an additional alias parameter for the comparison
function in case of floats?

E.g.

    enum EF : float { C = 4.9 }
    float f = 4.9;
    static bool compFunc(float lhs, float rhs) { ... }
    EF en2 = to!(EF, compFunc)(f);

Since conv.to will already do the work necessary to 1) find the matching
member, 2) ensure there's only 1 matching member, I think customization like
this might be friendlier than just rejecting conversion.

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

Reply via email to