2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-23 06:02:14 +00:00

Thread: fix issue with continuation's future parameter which must taken by value.

[SVN r84979]
This commit is contained in:
Vicente J. Botet Escriba
2013-07-07 20:44:02 +00:00
parent d759dd2dba
commit 794d54a65c
3 changed files with 6 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ int main()
}
{
boost::future<int> f1 = boost::async(boost::launch::async, []() {return 123;});
boost::future<int> f2 = f1.then([](boost::future<int>& f) {return 2*f.get(); });
boost::future<int> f2 = f1.then([](boost::future<int> f) {return 2*f.get(); });
int result = f2.get();
BOOST_THREAD_LOG << "f2 " << result << BOOST_THREAD_END_LOG;
}