|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-07-11 17:29:00
Sean Parent wrote:
>> This could have been avoided by defining a separate relation for
>> set/map
>> order, either as a function reachable via ADL, or as a function
>> object, then
>> making sure that it is defined for all standard value types.
> Why is this necessary? std::less<> serves us well and avoids the
> whole ADL mess.
std::less is ambiguous. It could be that you wanted merely the function
object representation of operator<, or it could be that you wanted the
default map/set ordering relation. It is not clear which of the two
std::less is supposed to be.
To give you an example, what would you expect std::greater<K> to do?
less_equal<K>?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk