Boost logo

Boost :

Subject: Re: [boost] unique_ptr for C++0x exprimental compilers?
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2009-06-04 23:24:38


Hi Vicente,

On Fri, Jun 5, 2009 at 1:07 AM, vicente.botet <vicente.botet_at_[hidden]> wrote:
> Hi,
> ----- Original Message -----
> From: "Dean Michael Berris" <mikhailberis_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Thursday, June 04, 2009 10:24 AM
> Subject: [boost] unique_ptr for C++0x exprimental compilers?
>
>
>> Hi,
>>
>> Is there anybody already implementing an auto_ptr replacement
>> (unique_ptr) for Boost? I've got a really simple implementation that
>> I'm attaching to this email (with tests) that I'm submitting for
>> review.
>
> Howard Hinnant has already provided an implementation. See (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.SmartPtr.UniquePtr).
>
> I don't know if he plans to submit it for Boost review.
>

Thanks for the link.

I read through his implementation and it uses simulated move for
C++03, but doesn't use C++0x rvalue references when they're available.
I'm guess it shouldn't take too much to use some compiler macro magic
to choose between an implementation that uses rvalue references (like
the one I posted) and a simulated rvalue reference / move / forward.

I really hope Howard's implementation gets reviewed and packaged into
Boost sooner than later. ;)

-- 
Dean Michael Berris | Software Engineer, Friendster, Inc.
blog.cplusplus-soup.com | twitter.com/mikhailberis |
linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis |
deanberris.com

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