Boost logo

Boost :

Subject: Re: [boost] [Boost.Pool] TR1?
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-04-12 11:04:13


On Apr 12, 2011, at 3:54 AM, Phil Bouchard <philippe_at_[hidden]> wrote:

On 4/11/2011 11:19 PM, Nevin Liber wrote:

On 11 April 2011 22:40, Phil Bouchard< <philippe_at_[hidden]>
philippe_at_[hidden]> wrote:

On 4/11/2011 6:02 PM, Dave Abrahams wrote:

Whatever the costs, you have a point because this is something that

can only be implemented portably by the standard. I'm certain that

Boost.Pool invokes undefined behavior whenever it returns false from

is_from().

Indeed 'false' basically means your not sure if the pointer will eventually

be part of the pool

But it may be undefined behavior to pass that pointer to is_from.

That's right but I am not sure about the complexity in making its behavior
non-undefined even if the complexity is not constant. Because otherwise
is_from() would be quite useless

I think you are severely missing the point: it is not implementable, no
matter the cost in complexity, without causing undefined behavior. You're
just not allowed to compare arbitrary pointers with <, and the total
ordering produce by std::less isn't guaranteed to be meaningful.


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