
On 7/11/06 11:51 AM, "David Abrahams" <dave@boost-consulting.com> wrote:
"Philippe Vaucher" <philippe.vaucher@gmail.com> writes:
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.
That would be exceedingly inconvenient. Having a builtin operator< for tuples is a huge win for users.
But should a convenient lie (providing fake operators "<" to use in sets & maps) trump an inconvenient truth (not providing such operators for types that model an unordered concept)? Convenient lies can suddenly turn inconvenient at the worst times.... -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com