Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2004-04-24 22:05:48


[reformatted]
> // yields true
> composite_key</* as before*> ck; ck(record(1,2,3))<=make_tuple(1,2);
>
> // yields true
> make_tuple(1,2)<=ck(record(1,2,3));
>
> So far, this is all IMHO perfectly consistent,
> but the following design decision is not
> obvious to me: given the previous, what should
> be the result of
>
> ck(record(1,2,3))==make_tuple(1,2); // true or false?
>
> As these two objects are neither greater than the
> other, at least they are *equivalent*, but maybe
> allowing operator== to return true is too much.

operator== should return false here. The operands are equivalent, but
not equal.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk