Boost logo

Boost :

Subject: Re: [boost] [block_ptr] Request for a review manager
From: Peter Dimov (lists_at_[hidden])
Date: 2016-02-09 09:02:42


> // do something that allocates from the heap
>
> v.emplace_back( new X );
>
>The last line constructs a block_ptr<X> inside the vector's allocated
>memory, which is on the heap. So the block_ptr goes looking for a previous
>heap allocation and finds some random one.

Ah wait, the last allocation is "new X" here. Hmm.


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