Skip to content

Commit

Permalink
Test with generic lambdas.
Browse files Browse the repository at this point in the history
  • Loading branch information
viboes committed Apr 17, 2015
1 parent 45c9a1d commit 66193b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example/lambda_future.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 66193b0

Please sign in to comment.