2 Mar
2016
2 Mar
'16
3:40 a.m.
On 03/01/2016 06:20 PM, Phil Bouchard wrote:
On 03/01/2016 04:27 PM, Ion GaztaƱaga wrote:
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.
I just added support for weak references but I still have problems with Boost containers: https://github.com/philippeb8/block_ptr/blob/master/example/block_ptr_test2.... -Phil