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


bearophile_h...@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2012-04-09 10:42:47 PDT ---
(In reply to comment #1)
> If you change opCmp signatures to:
> 
>     int opCmp(const S rhs) const
>     int opCmp(const ref S rhs) const
>     // may work in general

Maybe one opCmp is enough in general:

struct S {
    C c;

    int opCmp()(const auto ref S rhs) const {
        if (c < rhs.c) return -1;
        if (c > rhs.c) return 1;
        return 0;
    }
}

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

Reply via email to