
5 Jun
2012
5 Jun
'12
12:31 a.m.
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) ) ) asio_io_service.post(f); // performs async move of v into some_method asio_io_service.post(f); // 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. Dan