
Please try to use the boost.context code from branch develop (github) - I think it is related to see #41 (boost.context) 2017-02-24 7:19 GMT+01:00 Gavin Lambert via Boost-users < boost-users@lists.boost.org>:
On 24/02/2017 14:20, I wrote:
On 23/02/2017 14:18, I wrote:
On 22/02/2017 21:05, Oliver Kowalke wrote:
At the moment I've no Windows system to test it, but the error might be caused by a missing export statement.
In execution_context_v1.hpp change the code to:
struct BOOST_CONTEXT_DECL activation_record ... struct BOOST_CONTEXT_DECL activation_record_initializer ...
Boost 1.60 doesn't have that file. But making those changes in execution_context.ipp causes the errors mentioned in https://svn.boost.org/trac/boost/ticket/11365 ie. being incompatible with thread_local (thread locals need to be behind a pimpl wall; they can't be exported directly).
I'm about to try updating to 1.63 anyway, so we'll see how that goes, I guess.
Good news: looks like this isn't an issue any more with Boost 1.63. My apologies for the noise.
Although now I have a related-but-different problem.
typedef boost::coroutines2::coroutine<void>::push_type coroutine;
std::vector<coroutine> coros; coros.emplace_back(std::bind(std::forward<F>(f), i, std::placeholders::_1)); // where f is a template functor&& and i is a template iterator
This code compiles fine in: - VS2013 (Windows, Boost 1.55, coroutines1) - VS2015 (Windows, Boost 1.55, coroutines1) - GCC 4.8.2 (Linux, Boost 1.55, coroutines1) - VS2015 (Windows, Boost 1.63, coroutines1 & coroutines2) - GCC 4.8.2 (Linux, Boost 1.63, coroutines1)
But using GCC with Boost 1.63 and coroutines2 I get some quite verbose errors that I'm having trouble making sense of. (Clang 3.4 gives a similar error.) Is this a bug or am I doing something weird?
/mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/exe cution_context_v2_void.ipp:55:99: error: no matching function for call to 'apply(std::decay<std::_Bind<boost::coroutines2::detail::pus h_coroutine<void>::control_block::control_block(boost::context::preallocated, StackAllocator, Fn&&) [with StackAllocator = boost::context::basic_fixedsiz e_stack<boost::context::stack_traits>; Fn = std::_Bind<{anonymous}::Test:: Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}:: Test::Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>, std::_Placeholder<1>)> >::type&, std::__tuple_cat_result<std::tuple<>&, std::tuple<boost::context::execution_context<void>&&>
::__type)' Ctx cc = apply( fn_, std::tuple_cat( params_, std::forward_as_tuple( std::move( from) ) ) );
^ /mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/exe cution_context_v2_void.ipp:55:99: note: candidate is: /mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/detail/apply.hpp:54:1: note: template<class Fn, class Tpl> decltype (boost::context::detail::apply_impl(forward<Fn>(fn), forward<Tpl>(tpl), boost::context::detail::make_i ndex_sequence<std::tuple_size<typename std::decay<_Tp2>::type>::value>{})) boost::context::detail::apply(Fn&&, Tpl&&) apply( Fn && fn, Tpl && tpl)
^ /mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/detail/apply.hpp:54:1: note: template argument deduction/substitution failed: /mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/detail/apply.hpp: In substitution of 'template<class Fn, class Tpl> decltype (boost::context::detail::apply_impl(forward<Fn>(fn), forward<Tpl>(tpl), boost::context::detail::make_index_sequence<std::tuple_size<typename std::decay<_Tp2>::type>::value>{})) boost::context::detail::apply(Fn&&, Tpl&&) [with Fn = std::_Bind<boost::coroutines2: :detail::push_coroutine<void>::control_block::control_block(boost::context::preallocated, StackAllocator, Fn&&) [with StackAllocator = boost::context::basic_fixedsiz e_stack<boost::context::stack_traits>; Fn = std::_Bind<{anonymous}::Test:: Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}:: Test::Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>, std::_Placeholder<1>)>&; Tpl = std::tuple<boost::context::execution_context<void>&&>]': /mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/exe cution_context_v2_void.ipp:55:99: required from 'boost::context::detail::transfer_t boost::context::detail::record_void<Ctx, StackAlloc, Fn, Params>::run(boost::context::detail::transfer_t) [with Ctx = boost::context::execution_context<void>; StackAlloc = boost::context::basic_fixedsize_stack<boost::context::stack_traits>; Fn = std::_Bind<boost::coroutines2::detail::push_coroutine<void>: :control_block::control_block(boost::context::preallocated, StackAllocator, Fn&&) [with StackAllocator = boost::context::basic_fixedsiz e_stack<boost::context::stack_traits>; Fn = std::_Bind<{anonymous}::Test:: Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}:: Test::Method()::__lambda8(std::reference_wrapper<std::pair<const {anonymous}::Address, std::vector<{anonymous}::Data> > >, std::_Placeholder<1>)>, std::_Placeholder<1>)>; Params = {}]'
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users