2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-21 05:22:15 +00:00

Test with generic lambdas.

This commit is contained in:
Vicente J. Botet Escriba
2015-04-17 18:31:34 +02:00
parent 45c9a1d7fd
commit 66193b0d38

View File

@@ -42,6 +42,14 @@ int main()
int result = f2.get();
BOOST_THREAD_LOG << "f2 " << result << BOOST_THREAD_END_LOG;
}
#if ! defined BOOST_NO_CXX14_GENERIC_LAMBDAS
{
boost::future<int> f1 = boost::async(boost::launch::async, []() {return 123;});
boost::future<int> f2 = f1.then([](auto f) {return 2*f.get(); });
int result = f2.get();
BOOST_THREAD_LOG << "f2 " << result << BOOST_THREAD_END_LOG;
}
#endif
}
catch (std::exception& ex)
{