Boost logo

Boost :

Subject: [boost] [bind] Move Parameters?
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2012-06-04 20:31:33

Say I have some synchronous code like this:
        vector<data> v;
        some_method( std::move(v) )

Now I want to call to make that some_method call asynchronous so what I really want is

        function<void()> f = bind( some_method, boost::rref( std::move(v) ) )
       ; // performs async move of v into some_method; // undefined, or throw bound parameter has already moved...
As far as I can tell there is no current support for anything like this, and I think it could be very useful.


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