diff --git a/example/future_then.cpp b/example/future_then.cpp index 7dd48624..4cdcf999 100644 --- a/example/future_then.cpp +++ b/example/future_then.cpp @@ -19,7 +19,7 @@ int p1() return 123; } -int p2(boost::future& f) +int p2(boost::future f) { BOOST_THREAD_LOG << "& f) } BOOST_THREAD_LOG << "P2>" << BOOST_THREAD_END_LOG; } -int p2s(boost::shared_future& f) +int p2s(boost::shared_future f) { BOOST_THREAD_LOG << " f1 = boost::async(boost::launch::async, []() {return 123;}); - boost::future f2 = f1.then([](boost::future& f) {return 2*f.get(); }); + boost::future f2 = f1.then([](boost::future f) {return 2*f.get(); }); int result = f2.get(); BOOST_THREAD_LOG << "f2 " << result << BOOST_THREAD_END_LOG; } diff --git a/example/tennis.cpp b/example/tennis.cpp index babc67dd..0212f677 100644 --- a/example/tennis.cpp +++ b/example/tennis.cpp @@ -4,6 +4,9 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#undef BOOST_THREAD_VERSION +#define BOOST_THREAD_VERSION 2 + #include #include #include