Boost logo

Boost :

Subject: Re: [boost] [Boost.Pool] TR1?
From: Anders Dalvander (boost_at_[hidden])
Date: 2011-04-13 15:32:26


On 2011-04-13 20:10, Nevin Liber wrote:
> On 13 April 2011 13:01, Anders Dalvander <boost_at_[hidden]
> <mailto:boost_at_[hidden]>> 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?

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk