
11 Jul
2006
11 Jul
'06
12:37 p.m.
How do you make a std::set of structs, pairs, or tuples?
Maybe it was already said (didn't read the whole thread), but I thought I'd add my 0.02$. I think we should not define meaningless operator< for the structs/whatever, and let the user define one if he wants to use those structs in a set. We could maybe also do some template / macro fun to help them to define those ? Something like : #define DEF_OP_MIN(cont) bool cont::operator<(const cont& a, const cont&b) { return &a < &b; } Philippe