
11 Jul
2006
11 Jul
'06
2:54 p.m.
Guillaume Melquiond wrote:
Back to the topic of operator< for smart_ptr, I think it was a mistake for the STL to use std::less as the default parameter for ordered containers. It would have been better to define some kind of total_order template class (that would have defaulted to being std::less).
I agree that the inclusion of a separate "set/map order" relation in the standard library (that is defined for all standard value types) would have made the correct choice obvious.