mirror of
https://github.com/boostorg/coroutine.git
synced 2026-02-13 12:22:33 +00:00
remove passing rvalues
This commit is contained in:
@@ -303,21 +303,13 @@ public:
|
||||
std::swap( callee_, other.callee_);
|
||||
}
|
||||
|
||||
symmetric_coroutine_call & operator()( Arg const& arg) BOOST_NOEXCEPT
|
||||
symmetric_coroutine_call & operator()( Arg arg) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( * this);
|
||||
|
||||
impl_->run( arg);
|
||||
return * this;
|
||||
}
|
||||
|
||||
symmetric_coroutine_call & operator()( BOOST_RV_REF( Arg) arg) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( * this);
|
||||
|
||||
impl_->run( forward< Arg >( arg) );
|
||||
return * this;
|
||||
}
|
||||
};
|
||||
|
||||
template< typename Arg, typename StackAllocator >
|
||||
|
||||
@@ -112,15 +112,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void run( R const& r) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
|
||||
param_type to( const_cast< R * >( & r) );
|
||||
run_( & to);
|
||||
}
|
||||
|
||||
void run( BOOST_RV_REF( R) r) BOOST_NOEXCEPT
|
||||
void run( R r) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
|
||||
@@ -145,22 +137,22 @@ public:
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
R * yield_to( symmetric_coroutine_impl< X > * other, X const& x)
|
||||
R * yield_to( symmetric_coroutine_impl< X > * other, X x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X >::param_type to( & x);
|
||||
return yield_to_( other, & to);
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
R * yield_to( symmetric_coroutine_impl< X & > * other, X const& x)
|
||||
R * yield_to( symmetric_coroutine_impl< X & > * other, X & x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( & x);
|
||||
return yield_to_( other, & to);
|
||||
}
|
||||
|
||||
@@ -281,22 +273,22 @@ public:
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
R * yield_to( symmetric_coroutine_impl< X > * other, X const& x)
|
||||
R * yield_to( symmetric_coroutine_impl< X > * other, X x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X >::param_type to( & x);
|
||||
return yield_to_( other, & to);
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
R * yield_to( symmetric_coroutine_impl< X & > * other, X const& x)
|
||||
R * yield_to( symmetric_coroutine_impl< X & > * other, X & x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( & x);
|
||||
return yield_to_( other, & to);
|
||||
}
|
||||
|
||||
@@ -393,16 +385,6 @@ public:
|
||||
preserve_fpu() );
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
void yield_to( symmetric_coroutine_impl< X > * other, X x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X >::param_type to( & x);
|
||||
yield_to_( other, & to);
|
||||
}
|
||||
|
||||
void yield() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
@@ -418,22 +400,22 @@ public:
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
void yield_to( symmetric_coroutine_impl< X > * other, X const& x)
|
||||
void yield_to( symmetric_coroutine_impl< X > * other, X x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X >::param_type to( & x);
|
||||
yield_to_( other, & to);
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
void yield_to( symmetric_coroutine_impl< X & > * other, X const& x)
|
||||
void yield_to( symmetric_coroutine_impl< X & > * other, X & x)
|
||||
{
|
||||
BOOST_ASSERT( ! is_complete() );
|
||||
BOOST_ASSERT( ! other->is_complete() );
|
||||
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( const_cast< X * >( & x) );
|
||||
typename symmetric_coroutine_impl< X & >::param_type to( & x);
|
||||
yield_to_( other, & to);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type const& x,
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x,
|
||||
typename disable_if<
|
||||
is_same< typename Coro::value_type, void >,
|
||||
dummy*
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type const& x,
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x,
|
||||
typename disable_if<
|
||||
is_same< typename Coro::value_type, void >,
|
||||
dummy*
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type const& x,
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x,
|
||||
typename disable_if<
|
||||
is_same< typename Coro::value_type, void >,
|
||||
dummy*
|
||||
|
||||
Reference in New Issue
Block a user