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/execution_context_v2_void.ipp:55:99:
error: no matching function for call to
'apply(std::decayboost::context::stack_traits; Fn
=
std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>, std::_Placeholder<1>)> >::type&,
std::__tuple_cat_result&,
std::tuple >::__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/execution_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 decltype
(boost::context::detail::apply_impl(forward<Fn>(fn), forward<Tpl>(tpl),
boost::context::detail::make_index_sequence::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 decltype
(boost::context::detail::apply_impl(forward<Fn>(fn), forward<Tpl>(tpl),
boost::context::detail::make_index_sequence::type>::value>{})) boost::context::detail::apply(Fn&&,
Tpl&&) [with Fn =
std::_Bindboost::context::stack_traits; Fn
=
std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>, std::_Placeholder<1>)>&; Tpl =
std::tuple]':
/mnt/ThirdParty/boost/boost_1_63_0/include/boost/context/execution_context_v2_void.ipp:55:99:
required from 'boost::context::detail::transfer_t
boost::context::detail::record_void::run(boost::context::detail::transfer_t) [with Ctx =
boost::context::execution_context<void>; StackAlloc =
boost::context::basic_fixedsize_stackboost::context::stack_traits; Fn
=
std::_Bindboost::context::stack_traits; Fn
=
std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>]::__lambda7(std::_Bind<{anonymous}::Test::Method()::__lambda8(std::reference_wrapper > >,
std::_Placeholder<1>)>, std::_Placeholder<1>)>; Params = {}]'