A Fresh Look at Comparisons, Take 2
Janice Caron
caron800 at googlemail.com
Sat Apr 19 08:32:28 PDT 2008
On 19/04/2008, Henning Hasemann <hhasemann at web.de> wrote:
> > Yes, that's true. But remember, partially ordered types cannot be used
> > as AA keys (at least, not if the AA is implemented as a binary tree
> > with total ordering), so we've got a problem right there. How do we
> > tell AAs "Yes, we've implemented opCmp(), but you're not allowed to
> > use it because it's partial"?
>
> By using a syntax different to opCmp ;)
You mean, like I suggested earlier in this thread? ;)
class P
{
bool partialLess(P p) {...}
bool partialGreater(P p) {...}
}
More information about the Digitalmars-d
mailing list