
24 Sep
2011
24 Sep
'11
7:54 p.m.
On Sat, Sep 24, 2011 at 2:04 AM, John Bytheway <jbytheway+boost@gmail.com>wrote:
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)
Well, then...add an operator() overload for (T*, T*) that forwards to std::less<T>, I suppose...? - Jeff