Boost logo

Boost :

Subject: Re: [boost] [Boost.Pool] TR1?
From: Anders Dalvander (boost_at_[hidden])
Date: 2011-04-13 14:01:06


On 2011-04-13 19:40, Dave Abrahams wrote:
> On Wed, Apr 13, 2011 at 1:32 PM, Anders Dalvander<boost_at_[hidden]> wrote:
>> Externally a contiguous memory block would be seen as a singleton and
>> comparing it using std::less to any other contiguous memory block would
>> result in either true or false.
>
> The issue is that if you test an address for being within a given
> memory block, you can get false positives.

But that's just the deal, we don't have to test, std::less does it for us.

> Oh, and to make things worse, IIRC there's nothing that says a< b ==
> std::less<...>()(a,b) even within a given block, e.g.
> std::less<>()(a,b) could be implemented as a> b! So you can get
> false negatives, too.

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.

>> WWFSMD?
>
> Advance the tape!

Probably the best, although slow, thing to do.

Regards,
Anders Dalvander


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