Boost logo

Boost :

Subject: Re: [boost] [Container] Inner Smart Pointers
From: Phil Bouchard (phil_at_[hidden])
Date: 2016-02-24 08:36:08


On 2016-02-23 11:34 PM, Phil Bouchard wrote:
> On 2016-02-23 6:19 AM, Ion Gaztañaga wrote:
>> On 23/02/2016 4:20, Phil Bouchard wrote:
>>> On 2016-02-18 11:53 PM, Phil Bouchard wrote:
>>>> I have to admit MSVC 2015 got a clean STL...
>>>>
>>>> block_ptr_test2.cpp doesn't crash but some assertions are wrong (in my
>>>> block_ptr tests).
>>>>
>>>> Is there any plans from Boost to make the Boost.Container work with
>>>> inner smart pointers? I don't think there is any other alternative if
>>>> people want to plugin memory management.
>>>
>>> After trying out to integrate the smart pointer into the MSVC's STL, it
>>> looks like they use raw node pointers so I don't think it'll be possible
>>> to do that after all.
>>>
>>> Is there any interests to modify the Boost.Container to use smart
>>> pointers?
>>
>> Boost.Container already uses whatever pointer
>> allocator_traits<A>::pointer returns. That's the standard customization
>> point for smart pointers in containers.
>
> Ok thanks but I would still suggest to use references to pointer
> arguments, that would improve efficiency.
>
> I added minimalistic support for allocator_traits and pointer_traits and
> in trying to compile the following file with MSVC 2015:
> https://github.com/philippeb8/block_ptr/blob/master/example/block_ptr_test2.cpp
>
>
> I still have 3 compilation errors which aren't so obvious to figure
> out... Once again I use the following preprocessor definitions:
> BOOST_DISABLE_THREADS;_ITERATOR_DEBUG_LEVEL=0.

If I compile under Cygwin:
g++ block_ptr_test2.cpp -fpermissive -std=c++11 -D__i386__
-DBOOST_DISABLE_THREADS -I ...

I get a few errors as well. I am not sure which API gets it wrong.


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