2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-25 18:52:16 +00:00

fix issue with c++03 compilers. Pass Executors by const& instead of by &.

This commit is contained in:
Vicente J. Botet Escriba
2015-03-04 07:59:27 +01:00
parent 7ffcec448c
commit 9a05211faa
6 changed files with 30 additions and 20 deletions

View File

@@ -105,6 +105,9 @@ int test_executor_adaptor()
{
boost::loop_executor e1;
boost::loop_executor e2 = e1;
boost::executor_adaptor < boost::loop_executor > ea2(e2);
submit_some( ea2);
ea2.underlying_executor().run_queued_closures();
}
{
boost::executor_adaptor < boost::loop_executor > ea2;
@@ -129,17 +132,19 @@ int test_executor_adaptor()
boost::executor_adaptor < boost::generic_serial_executor > ea3(ea2);
submit_some(ea3);
}
#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
//#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
{
boost::basic_thread_pool ea1(4);
boost::executor_adaptor < boost::generic_serial_executor > ea2(ea1);
submit_some(ea2);
}
#endif
//#endif
// std::cout << BOOST_CONTEXTOF << std::endl;
{
boost::inline_executor e1;
boost::inline_executor e2 = e1;
boost::executor_adaptor < boost::inline_executor > ea2(e2);
submit_some(ea2);
}
{
boost::executor_adaptor < boost::inline_executor > ea1;
@@ -150,6 +155,12 @@ int test_executor_adaptor()
boost::thread_executor e1;
boost::thread_executor e2 = e1;
}
{
boost::thread_executor e1;
boost::executor_adaptor < boost::generic_executor > ea2(e1);
submit_some(ea2);
}
{
boost::executor_adaptor < boost::thread_executor > ea1;
submit_some(ea1);