|
Boost : |
Subject: Re: [boost] C++03 unique_ptr emulation
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2009-01-08 03:13:56
On Wed, 7 Jan 2009 20:40:13 -0500, Howard Hinnant <hinnant_at_[hidden]>
wrote:
>
> Noteworthy points:
>
> * 3 of the tests currently fail for me (fail at compile time,
> supposed to compile, run and pass). These are all associated with the
> converting constructor specified in [unique.ptr.single.ctor]. When
> the source and target are of different type, this emulation demands
> that the conversion be explicit, and refuses to compile on implicit
> conversions:
>
> unique_ptr<base> b(unique_ptr<derived>()); // ok
>
> unique_ptr<base> b = unique_ptr<derived>(); // causes 3 compile time
> failures under unique.ptr/unique.ptr.single/unique.ptr.single.ctor
>
> I consider this not bad for an emulation. And otherwise things look
> pretty good. I was able to get more working than I thought I would.
>
This is consistent with the conversions I could not get to work in my Clang
smart pointers.
Sebastian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk