![]() |
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2006-07-18 18:29:26
On 7/11/06 11:51 AM, "David Abrahams" <dave_at_[hidden]> wrote:
> "Philippe Vaucher" <philippe.vaucher_at_[hidden]> 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
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk