Boost logo

Boost :

Subject: [boost] [Block Pointer] Update
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-09 23:28:24


- So I've restructured all the code in the correct namespaces
boost::smart_ptr & boost::smart_ptr::detail:

- I am now using another smart pointer to refer to proxies because it is
safer but the code is 15% slower than without it (now ~= shared_ptr<>):

auto_ptr: 26211292 ns
shared_ptr: 27291607 ns
block_ptr: 61097868 ns

auto_ptr: 23240569 ns
shared_ptr: 48016207 ns
block_ptr: 55554121 ns

- Because of the removal of the proxy optimization there is a new
caveat; if you assign an rvalue (temporary pointer on the stack) to a
pointer on the heap (opposite of normal heap object assigned to stack
pointer) then there the behavior will be undefined. I am looking to fix
it or throw an exception but for now it's better not to use rvalues when
assigning to pointer living on the heap as such:


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