Boost logo

Boost :

From: Daniel James (daniel_james_at_[hidden])
Date: 2008-06-23 18:44:26


On 23/06/2008, Daniel James <daniel_james_at_[hidden]> wrote:
> 2008/6/23 David Abrahams <dave_at_[hidden]>:
> >
> > I have a hunch that it would be really easy to add support for move-only
> > types, though. Do you see any specific obstacles?

I had a quick try at implementing move-only types. It looks like you're right:

http://svn.boost.org/trac/boost/changeset/46631

y.hpp contains the move-only type. The code might look familiar.

It mostly works. I've found two problems so far. Firstly,
is_convertible didn't work for the type, but I managed to work around
that (I'll probably need to refine the change to is_movable).
Secondly, it doesn't seem to be able to pass rvalues by reference. I'm
not sure how to get round that, I'll have to learn more about the
trick used to implement it.

Daniel


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