Boost logo

Boost :

Subject: Re: [boost] unique_ptr, was: Composing non copyable and movable classes
From: David Abrahams (dave_at_[hidden])
Date: 2008-12-18 16:20:07

on Thu Dec 18 2008, Sebastian Redl <> wrote:

> Another weakness - at least in my implementation - is that implicit conversions on
> return don't work. This is not a problem for unique_ptr, really, but it is for my more
> complex pointers.
> OwningStmtResult foo()
> {
> return true; // OwningStmtResult has an implicit conversion from bool.
> }
> This fails to compile.

IIRC, if you look around the web you can find an implementation of
"move_ptr" by Jonathan Turkanis that does a perfect emulation.

Dave Abrahams
BoostPro Computing

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