|
Boost : |
Subject: [boost] unique_ptr, was: Composing non copyable and movable classes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-12-10 15:52:58
Michael Marcin:
> Speaking of unique_ptr is it possible to get a C++03 emulation of
> unique_ptr into boost?
>
> I've been using
> http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr_03.html for
> months and it seems to work fine.
To get it into Boost, someone needs to contribute the tests and
documentation and commit to maintaining it. :-)
That said, I'm not fond of this property of the cited implementation:
#
This implementation will mistakenly move from const lvalues.
const unique_ptr<int> cp;
unique_ptr<int> p(cp); // should not compile
-- Peter Dimov http://www.pdplayer.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk