diff options
Diffstat (limited to 'boost/coroutine2/detail/pull_control_block_cc.ipp')
-rw-r--r-- | boost/coroutine2/detail/pull_control_block_cc.ipp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/boost/coroutine2/detail/pull_control_block_cc.ipp b/boost/coroutine2/detail/pull_control_block_cc.ipp index 0406202016..486833455e 100644 --- a/boost/coroutine2/detail/pull_control_block_cc.ipp +++ b/boost/coroutine2/detail/pull_control_block_cc.ipp @@ -39,7 +39,6 @@ pull_coroutine< T >::control_block::destroy( control_block * cb) noexcept { cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; - c.resume(); } template< typename T > @@ -104,9 +103,6 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc, return other->c.resume(); }); #endif - if ( c.data_available() ) { - set( c.get_data< T >() ); - } } template< typename T > @@ -140,11 +136,6 @@ template< typename T > void pull_coroutine< T >::control_block::resume() { c = c.resume(); - if ( c.data_available() ) { - set( c.get_data< T >() ); - } else { - reset(); - } if ( except) { std::rethrow_exception( except); } @@ -173,16 +164,6 @@ pull_coroutine< T >::control_block::set( T && t) { } template< typename T > -void -pull_coroutine< T >::control_block::reset() { - // destroy data if set - if ( bvalid) { - reinterpret_cast< T * >( std::addressof( storage) )->~T(); - } - bvalid = false; -} - -template< typename T > T & pull_coroutine< T >::control_block::get() noexcept { return * reinterpret_cast< T * >( std::addressof( storage) ); @@ -205,7 +186,6 @@ pull_coroutine< T & >::control_block::destroy( control_block * cb) noexcept { cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; - c.resume(); } template< typename T > @@ -270,9 +250,6 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo return other->c.resume(); }); #endif - if ( c.data_available() ) { - set( c.get_data< T & >() ); - } } template< typename T > @@ -298,11 +275,6 @@ template< typename T > void pull_coroutine< T & >::control_block::resume() { c = c.resume(); - if ( c.data_available() ) { - set( c.get_data< T & >() ); - } else { - reset(); - } if ( except) { std::rethrow_exception( except); } @@ -316,15 +288,6 @@ pull_coroutine< T & >::control_block::set( T & t) { } template< typename T > -void -pull_coroutine< T & >::control_block::reset() { - if ( bvalid) { - reinterpret_cast< holder * >( std::addressof( storage) )->~holder(); - } - bvalid = false; -} - -template< typename T > T & pull_coroutine< T & >::control_block::get() noexcept { return reinterpret_cast< holder * >( std::addressof( storage) )->t; @@ -347,7 +310,6 @@ pull_coroutine< void >::control_block::destroy( control_block * cb) noexcept { cb->~control_block(); // destroy coroutine's stack cb->state |= state_t::destroy; - c.resume(); } template< typename StackAllocator, typename Fn > |