
11 Jul
2006
11 Jul
'06
9:29 p.m.
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>?