From 76113d355d3bf1562dd8a4542eabf52db5cb8f19 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 2 Feb 2014 17:01:44 +0100 Subject: [PATCH] pass values per reference to other coroutine (yield_to) --- .../boost/coroutine/detail/symmetric_coroutine_self.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/coroutine/detail/symmetric_coroutine_self.hpp b/include/boost/coroutine/detail/symmetric_coroutine_self.hpp index 6b923cb..1f3180b 100644 --- a/include/boost/coroutine/detail/symmetric_coroutine_self.hpp +++ b/include/boost/coroutine/detail/symmetric_coroutine_self.hpp @@ -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);