
On 2011-04-13 20:10, Nevin Liber wrote:
On 13 April 2011 13:01, Anders Dalvander <boost@dalvander.com <mailto:boost@dalvander.com>> wrote:
Don't think so, 20.3.3/5 states:
template <class T> struct less : binary_function<T,T,bool> { bool operator()(const T& x, const T& y) const; };
operator() returns x < y.
Which doesn't apply to pointers.
You are underquoting and context was lost. I was replying to Dave:
Oh, and to make things worse, IIRC there's nothing that says a< b == std::less<...>()(a,b) even within a given block
x < y applies to pointers, if they belong to the same block. 20.3.3/8 extend that promise:
"For templates greater, less, greater_equal, and less_equal, the specializations for any pointer type yield a total order, even if the built-in operators <, >, <=, >= do not."
Regards, Anders Dalvander -- WWFSMD?