
On 11/9/2011 5:09 PM, Peter Dimov wrote:
Szymon Gatner wrote:
Hi,
as suggested by Dave Abrahams I am now turning here with proposition of including unique_ptr<> to smart_ptr library. Newly accepted boost.move enables portable implementation and move-aware containers in boost.container allow to take full advantage of this now standard pointer type.
Attaching proposed implementation.
Hi Szymon,
What you have looks good. However, for inclusion you'll need to provide tests and a documentation page. Ideally, the test(s) would follow the specification and test every feature against it, although something more abbreviated may be acceptable too, as long as it has reasonably good coverage of the typical uses. You should look at the existing shared_ptr tests as an example.
The proposed implementation doesn't work for VC10 and probably anything
that actually has rvalue references.
It might be enough to guard
unique_ptr_storage
operator rv