160 changes: 68 additions & 92 deletions include/boost/thread/future.hpp

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion test/Jamfile.v2
Expand Up @@ -958,9 +958,12 @@ rule thread-compile ( sources : reqs * : name )
explicit ts_ ;
test-suite ts_
:
#[ thread-run test_11256.cpp ]
#[ thread-run test_11256.cpp ]
#[ thread-run test_11499.cpp ]
[ thread-run test_11611.cpp ]
#[ thread-run test_11611.cpp ]
[ thread-run2-noit ./sync/futures/shared_future/then_executor_pass.cpp : shared_future__then_executor_p2 ]
[ thread-run2-noit ./sync/futures/future/then_executor_pass.cpp : future__then_executor_p2 ]
;


Expand Down
12 changes: 8 additions & 4 deletions test/test_10964.cpp
Expand Up @@ -96,11 +96,17 @@ int main()
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
for (int i=0; i< number_of_tests; i++)
{
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
auto f1 = boost::make_ready_future().then(TestCallback());
BOOST_STATIC_ASSERT(std::is_same<decltype(f1), boost::future<boost::future<void> > >::value);
boost::future<void> f2 = f1.get();
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
}
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
{
auto f1 = boost::make_ready_future().then(TestCallback());
BOOST_STATIC_ASSERT(std::is_same<decltype(f1), boost::future<boost::future<void> > >::value);
auto f3 = f1.then(TestCallback());
BOOST_STATIC_ASSERT(std::is_same<decltype(f3), boost::future<boost::future<void> > >::value);
f3.wait();
}
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
for (int i=0; i< number_of_tests; i++)
Expand Down Expand Up @@ -135,8 +141,6 @@ int main()
BOOST_STATIC_ASSERT(std::is_same<decltype(f3), boost::future<boost::future<void> > >::value);
f3.wait();
}


std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
for (int i=0; i< number_of_tests; i++)
{
Expand Down