mirror of
https://github.com/boostorg/coroutine.git
synced 2026-02-09 23:12:42 +00:00
pass values per reference to other coroutine (yield_to)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user