diff --git a/example/executor.cpp b/example/executor.cpp index b9c91fbf..15c43804 100644 --- a/example/executor.cpp +++ b/example/executor.cpp @@ -111,25 +111,29 @@ int test_executor_adaptor() submit_some( ea2); ea2.underlying_executor().run_queued_closures(); } -#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) // std::cout << BOOST_CONTEXTOF << std::endl; -// { -// boost::basic_thread_pool tp; -// boost::generic_serial_executor e1(tp); -// boost::generic_serial_executor e2 = e1; -// } + { + boost::basic_thread_pool tp; + boost::generic_serial_executor e1(tp); + boost::generic_serial_executor e2 = e1; + } + { + boost::basic_thread_pool ea1(4); + boost::generic_serial_executor ea2(ea1); + boost::executor_adaptor < boost::generic_serial_executor > ea3(ea2); + submit_some(ea3); + } // { // boost::basic_thread_pool ea1(4); // boost::executor_adaptor < boost::generic_serial_executor > ea2(ea1); // submit_some(ea2); // } -// { -// boost::basic_thread_pool ea1(4); -// boost::generic_serial_executor ea2(ea1); -// boost::executor_adaptor < boost::generic_serial_executor > ea3(ea2); -// submit_some(ea3); -// } -#endif +// { +// boost::basic_thread_pool ea1(4); +// boost::generic_serial_executor ea2(ea1); +// boost::executor_adaptor < boost::generic_serial_executor > ea3(ea2); +// submit_some(ea3); +// } // std::cout << BOOST_CONTEXTOF << std::endl; { boost::inline_executor e1; diff --git a/include/boost/thread/executors/basic_thread_pool.hpp b/include/boost/thread/executors/basic_thread_pool.hpp index d03a31e0..ab943f3d 100644 --- a/include/boost/thread/executors/basic_thread_pool.hpp +++ b/include/boost/thread/executors/basic_thread_pool.hpp @@ -280,7 +280,8 @@ namespace executors * \b Throws: Whatever exception is thrown while initializing the needed resources. */ basic_thread_pool(unsigned const thread_count = thread::hardware_concurrency()+1) - : pimpl(make_shared(thread_count)) + //: pimpl(make_shared(thread_count)) // todo check why this doesn't works with C++03 + : pimpl(new shared_state(thread_count)) { pimpl->init(); } diff --git a/include/boost/thread/executors/generic_serial_executor.hpp b/include/boost/thread/executors/generic_serial_executor.hpp index 283915da..2c4aca07 100644 --- a/include/boost/thread/executors/generic_serial_executor.hpp +++ b/include/boost/thread/executors/generic_serial_executor.hpp @@ -186,7 +186,7 @@ namespace executors generic_serial_executor(Executor& ex, typename boost::disable_if::type, generic_serial_executor>, int* >::type = (int*)0) - //: pimpl(make_shared(ex)) // // todo check why this doesn't works with C++03 + //: pimpl(make_shared(ex)) // todo check why this doesn't works with C++03 : pimpl(new shared_state(ex)) { }