Re: [multi_index] composite keys: request for advice

25 Apr
2004
25 Apr
'04
3:05 a.m.
[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
7719
Age (days ago)
7719
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dave Gomboc