
24 Sep
2011
24 Sep
'11
9:04 a.m.
On 24/09/11 01:12, Jeffrey Lee Hellrung, Jr. wrote: <snip>
struct less { typedef bool result_type; template< class T, class U > bool operator()(T const & x, U const & y) const { return x < y; } };
for the default comparison function object. I don't think using std::less, directly or indirectly, over operator< buys you anything here, does it?
Yes, it does buy you something. std::less defines a total ordering on pointers, operator< need not. (See N3290 [comparisons] 20.8.5 p8) John Bytheway