Boost logo

Boost :

Subject: Re: [boost] [Block.Pointer][Container] List node allocator
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-01 18:20:04

On 03/01/2016 04:27 PM, Ion Gaztañaga wrote:
> On 01/03/2016 14:14, Phil Bouchard wrote:
>> Sorry I forgot that the header node is instantiated on the stack. Smart
>> pointers pointing to objects on the stack doesn't work so therefore
>> modifications to the Container API will be needed to support smart
>> pointers.
> Supporting embedded end pointers is not only an option, but the choice
> of most STL implementations. It makes default constructors nothrow and
> improves performance. Any smart pointer should support pointing to those
> end nodes or it's just broken for STL-like containers.

You're right. I think there's a way for block_ptr<> to support weak
references and I will get rid of the strange pointer-on-the-heap
initialization optimization at the same time.


Boost list run by bdawes at, gregod at, cpdaniel at, john at