Boost logo

Boost :

Subject: Re: [boost] [smart_ptr][intrusive] boost::unique_ptr<>
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-05-29 22:03:57

2014-05-30 3:08 GMT+02:00 Glen Fernandes <glen.fernandes_at_[hidden]>:

> On Thu, May 29, 2014 at 9:19 AM, Adam Wulkiewicz wrote:
> > Hi,
> >
> > I remember that there was plans to release an "official" STD-conformant
> > implementation of boost::unique_ptr<>.
> > I found:
> >
> >
> >
> Though both threads are about a C++03 emulation of unique_ptr, I
> wonder if it is worth providing a boost::unique_ptr for C++
> implementations still in use that support enough of C++11 r-value
> references but ship with a broken, or non-conforming, std::unique_ptr
> implementation.
> [Such as VC10 and VC11 whose std::unique_ptr has a broken reset() or
> whose std::unique_ptr has a broken conversion to bool when a different
> deleter type is specified. I believe there are a few bugs reported
> about VC12's std::unique_ptr but I haven't looked into them.]
Actually I had both in mind. If r-val refs were supported it should be
STD-conformant implementation, if not, the emulation e.g. using Boost.Move.
Plus boost::make_unique() using r-val refs and variadic templates if they
were supported or emulating them e.g. using Move and Preprocessor.

Someone could say that we should move forward and use C++11/14 but the
reality is that many projects are bound to some old compiler versions.


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