
On Apr 12, 2011, at 3:54 AM, Phil Bouchard <philippe@fornux.com> wrote: On 4/11/2011 11:19 PM, Nevin Liber wrote: On 11 April 2011 22:40, Phil Bouchard< <philippe@fornux.com> philippe@fornux.com> 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.