Boost logo

Boost :

Subject: Re: [boost] Removing auto_ptr/etc. from Boost
From: Peter Dimov (lists_at_[hidden])
Date: 2015-03-18 18:40:24


Stephan T. Lavavej wrote:
> Hi Boost devs,
>
> I need your help to get rid of auto_ptr forever.
>
> I want to implement C++17's N4190 "Removing auto_ptr, random_shuffle(),
> And Old <functional> Stuff", although it's going to take a while. In VC
> 2015, the removal will be opt-in (requested via a macro; I've already
> checked this in). My plan is for the removal to be opt-out in the version
> after that, and unconditional in the version after that.
>
> To achieve the opt-in removal, I've already eliminated the STL's internal
> dependencies on this stuff (nothing derives from
> unary_function/binary_function anymore, and shuffle() isn't directly
> implemented with random_shuffle() anymore). To prepare for the future of
> opt-out removal, I've also been removing usage from the compiler and other
> stuff. However, Boost is used in our tests in a number of places.
>
> What I'd like to ask is for Boost to begin removing its usage of this
> stuff (unconditionally or for VC 2015+, your pick). According to my
> understanding, only unary_function/binary_function and auto_ptr are used
> extensively by Boost, with the other stuff being used rarely or not at
> all.

shared_ptr has a constructor taking auto_ptr, but it's guarded by a Config
macro, BOOST_NO_AUTO_PTR. This was originally for outdated compilers that
didn't have auto_ptr yet, and now it's going to be for futuristic compilers
that don't have it anymore. Everything old is new again, yet with a twist.


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