diff --git a/example/lambda_future.cpp b/example/lambda_future.cpp index 6df1cee7..fd15d448 100644 --- a/example/lambda_future.cpp +++ b/example/lambda_future.cpp @@ -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 f1 = boost::async(boost::launch::async, []() {return 123;}); + boost::future 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) {