pass values per reference to other coroutine (yield_to)

This commit is contained in:
Oliver Kowalke
2014-02-02 17:01:44 +01:00
parent 2257d2ddf9
commit 76113d355d

View File

@@ -82,7 +82,7 @@ public:
}
template< typename Coro, typename X >
symmetric_coroutine_self & operator()( Coro & other, X x)
symmetric_coroutine_self & operator()( Coro & other, X & x)
{
BOOST_ASSERT( other);
@@ -115,6 +115,8 @@ private:
typedef parameters< R & > param_type;
typedef symmetric_coroutine_impl< R & > impl_type;
struct dummy {};
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_self)
impl_type * impl_;
@@ -160,7 +162,7 @@ public:
}
template< typename Coro, typename X >
symmetric_coroutine_self & operator()( Coro & other, X x)
symmetric_coroutine_self & operator()( Coro & other, X & x)
{
BOOST_ASSERT( other);
@@ -226,7 +228,7 @@ public:
{ std::swap( impl_, other.impl_); }
template< typename Coro, typename X >
symmetric_coroutine_self & operator()( Coro & other, X x)
symmetric_coroutine_self & operator()( Coro & other, X & x)
{
BOOST_ASSERT( other);