mirror of
https://github.com/boostorg/coroutine.git
synced 2026-02-13 12:22:33 +00:00
rename symmetric_coroutine_self -> symmetric_coroutine_yield
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_SELF_H
|
||||
#define BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_SELF_H
|
||||
#ifndef BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_YIELD_H
|
||||
#define BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_YIELD_H
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace coroutines {
|
||||
namespace detail {
|
||||
|
||||
template< typename R >
|
||||
class symmetric_coroutine_self
|
||||
class symmetric_coroutine_yield
|
||||
{
|
||||
private:
|
||||
template< typename X, typename Y, typename Z >
|
||||
@@ -38,12 +38,12 @@ private:
|
||||
typedef parameters< R > param_type;
|
||||
typedef symmetric_coroutine_impl< R > impl_type;
|
||||
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_self)
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_yield)
|
||||
|
||||
impl_type * impl_;
|
||||
R * result_;
|
||||
|
||||
symmetric_coroutine_self( impl_type * impl, R * result) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( impl_type * impl, R * result) BOOST_NOEXCEPT :
|
||||
impl_( impl),
|
||||
result_( result)
|
||||
{
|
||||
@@ -52,18 +52,18 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
symmetric_coroutine_self() BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield() BOOST_NOEXCEPT :
|
||||
impl_( 0)
|
||||
{}
|
||||
|
||||
symmetric_coroutine_self( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT :
|
||||
impl_( 0),
|
||||
result_( 0)
|
||||
{ swap( other); }
|
||||
|
||||
symmetric_coroutine_self & operator=( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT
|
||||
symmetric_coroutine_yield & operator=( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT
|
||||
{
|
||||
symmetric_coroutine_self tmp( boost::move( other) );
|
||||
symmetric_coroutine_yield tmp( boost::move( other) );
|
||||
swap( tmp);
|
||||
return * this;
|
||||
}
|
||||
@@ -73,20 +73,20 @@ public:
|
||||
bool operator!() const BOOST_NOEXCEPT
|
||||
{ return 0 == impl_; }
|
||||
|
||||
void swap( symmetric_coroutine_self & other) BOOST_NOEXCEPT
|
||||
void swap( symmetric_coroutine_yield & other) BOOST_NOEXCEPT
|
||||
{
|
||||
std::swap( impl_, other.impl_);
|
||||
std::swap( result_, other.result_);
|
||||
}
|
||||
|
||||
symmetric_coroutine_self & operator()()
|
||||
symmetric_coroutine_yield & operator()()
|
||||
{
|
||||
result_ = impl_->yield();
|
||||
return * this;
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other, typename Coro::value_type & x)
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other)
|
||||
symmetric_coroutine_yield & operator()( Coro & other)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
};
|
||||
|
||||
template< typename R >
|
||||
class symmetric_coroutine_self< R & >
|
||||
class symmetric_coroutine_yield< R & >
|
||||
{
|
||||
private:
|
||||
template< typename X, typename Y, typename Z >
|
||||
@@ -123,12 +123,12 @@ private:
|
||||
|
||||
struct dummy {};
|
||||
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_self)
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_yield)
|
||||
|
||||
impl_type * impl_;
|
||||
R * result_;
|
||||
|
||||
symmetric_coroutine_self( impl_type * impl, R * result) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( impl_type * impl, R * result) BOOST_NOEXCEPT :
|
||||
impl_( impl),
|
||||
result_( result)
|
||||
{
|
||||
@@ -137,18 +137,18 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
symmetric_coroutine_self() BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield() BOOST_NOEXCEPT :
|
||||
impl_( 0)
|
||||
{}
|
||||
|
||||
symmetric_coroutine_self( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT :
|
||||
impl_( 0),
|
||||
result_( 0)
|
||||
{ swap( other); }
|
||||
|
||||
symmetric_coroutine_self & operator=( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT
|
||||
symmetric_coroutine_yield & operator=( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT
|
||||
{
|
||||
symmetric_coroutine_self tmp( boost::move( other) );
|
||||
symmetric_coroutine_yield tmp( boost::move( other) );
|
||||
swap( tmp);
|
||||
return * this;
|
||||
}
|
||||
@@ -158,20 +158,20 @@ public:
|
||||
bool operator!() const BOOST_NOEXCEPT
|
||||
{ return 0 == impl_; }
|
||||
|
||||
void swap( symmetric_coroutine_self & other) BOOST_NOEXCEPT
|
||||
void swap( symmetric_coroutine_yield & other) BOOST_NOEXCEPT
|
||||
{
|
||||
std::swap( impl_, other.impl_);
|
||||
std::swap( result_, other.result_);
|
||||
}
|
||||
|
||||
symmetric_coroutine_self & operator()()
|
||||
symmetric_coroutine_yield & operator()()
|
||||
{
|
||||
result_ = impl_->yield();
|
||||
return * this;
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other, typename Coro::value_type & x)
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other)
|
||||
symmetric_coroutine_yield & operator()( Coro & other)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class symmetric_coroutine_self< void >
|
||||
class symmetric_coroutine_yield< void >
|
||||
{
|
||||
private:
|
||||
template< typename X, typename Y, typename Z >
|
||||
@@ -206,26 +206,26 @@ private:
|
||||
typedef parameters< void > param_type;
|
||||
typedef symmetric_coroutine_impl< void > impl_type;
|
||||
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_self)
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE( symmetric_coroutine_yield)
|
||||
|
||||
impl_type * impl_;
|
||||
|
||||
symmetric_coroutine_self( impl_type * impl) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( impl_type * impl) BOOST_NOEXCEPT :
|
||||
impl_( impl)
|
||||
{ BOOST_ASSERT( impl_); }
|
||||
|
||||
public:
|
||||
symmetric_coroutine_self() BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield() BOOST_NOEXCEPT :
|
||||
impl_( 0)
|
||||
{}
|
||||
|
||||
symmetric_coroutine_self( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT :
|
||||
symmetric_coroutine_yield( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT :
|
||||
impl_( 0)
|
||||
{ swap( other); }
|
||||
|
||||
symmetric_coroutine_self & operator=( BOOST_RV_REF( symmetric_coroutine_self) other) BOOST_NOEXCEPT
|
||||
symmetric_coroutine_yield & operator=( BOOST_RV_REF( symmetric_coroutine_yield) other) BOOST_NOEXCEPT
|
||||
{
|
||||
symmetric_coroutine_self tmp( boost::move( other) );
|
||||
symmetric_coroutine_yield tmp( boost::move( other) );
|
||||
swap( tmp);
|
||||
return * this;
|
||||
}
|
||||
@@ -235,17 +235,17 @@ public:
|
||||
bool operator!() const BOOST_NOEXCEPT
|
||||
{ return 0 == impl_; }
|
||||
|
||||
void swap( symmetric_coroutine_self & other) BOOST_NOEXCEPT
|
||||
void swap( symmetric_coroutine_yield & other) BOOST_NOEXCEPT
|
||||
{ std::swap( impl_, other.impl_); }
|
||||
|
||||
symmetric_coroutine_self & operator()()
|
||||
symmetric_coroutine_yield & operator()()
|
||||
{
|
||||
impl_->yield();
|
||||
return * this;
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other, typename Coro::value_type & x)
|
||||
symmetric_coroutine_yield & operator()( Coro & other, typename Coro::value_type & x)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
}
|
||||
|
||||
template< typename Coro >
|
||||
symmetric_coroutine_self & operator()( Coro & other)
|
||||
symmetric_coroutine_yield & operator()( Coro & other)
|
||||
{
|
||||
BOOST_ASSERT( other);
|
||||
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
};
|
||||
|
||||
template< typename R >
|
||||
void swap( symmetric_coroutine_self< R > & l, symmetric_coroutine_self< R > & r)
|
||||
void swap( symmetric_coroutine_yield< R > & l, symmetric_coroutine_yield< R > & r)
|
||||
{ l.swap( r); }
|
||||
|
||||
}}}
|
||||
@@ -273,4 +273,4 @@ void swap( symmetric_coroutine_self< R > & l, symmetric_coroutine_self< R > & r)
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif // BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_SELF_H
|
||||
#endif // BOOST_COROUTINES_DETAIL_SYMMETRIC_COROUTINE_YIELD_H
|
||||
@@ -60,10 +60,10 @@ void trampoline( intptr_t vp)
|
||||
reinterpret_cast< intptr_t >( & c),
|
||||
c.preserve_fpu() ) ) );
|
||||
|
||||
// create self_type
|
||||
Self self( & c, from->data);
|
||||
// create yield_type
|
||||
Self yield( & c, from->data);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
@@ -101,10 +101,10 @@ void trampoline_void( intptr_t vp)
|
||||
reinterpret_cast< intptr_t >( & c),
|
||||
c.preserve_fpu() );
|
||||
|
||||
// create self_type
|
||||
Self self( & c);
|
||||
// create yield_type
|
||||
Self yield( & c);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
|
||||
@@ -62,9 +62,9 @@ void trampoline_pull( intptr_t vp)
|
||||
|
||||
// create push_coroutine
|
||||
typename Self::impl_type b( c.callee_, c.caller_, false, c.preserve_fpu() );
|
||||
Self self( & b);
|
||||
Self yield( & b);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
@@ -108,9 +108,9 @@ void trampoline_pull_void( intptr_t vp)
|
||||
|
||||
// create push_coroutine
|
||||
typename Self::impl_type b( c.callee_, c.caller_, false, c.preserve_fpu() );
|
||||
Self self( & b);
|
||||
Self yield( & b);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
|
||||
@@ -62,9 +62,9 @@ void trampoline_push( intptr_t vp)
|
||||
|
||||
// create push_coroutine
|
||||
typename Self::impl_type b( c.callee_, c.caller_, false, c.preserve_fpu(), from->data);
|
||||
Self self( & b);
|
||||
Self yield( & b);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
@@ -108,9 +108,9 @@ void trampoline_push_void( intptr_t vp)
|
||||
|
||||
// create push_coroutine
|
||||
typename Self::impl_type b( c.callee_, c.caller_, false, c.preserve_fpu() );
|
||||
Self self( & b);
|
||||
Self yield( & b);
|
||||
try
|
||||
{ fn( self); }
|
||||
{ fn( yield); }
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <boost/coroutine/detail/parameters.hpp>
|
||||
#include <boost/coroutine/detail/setup.hpp>
|
||||
#include <boost/coroutine/detail/symmetric_coroutine_impl.hpp>
|
||||
#include <boost/coroutine/detail/symmetric_coroutine_self.hpp>
|
||||
#include <boost/coroutine/detail/symmetric_coroutine_yield.hpp>
|
||||
#include <boost/coroutine/detail/trampoline.hpp>
|
||||
#include <boost/coroutine/stack_allocator.hpp>
|
||||
|
||||
@@ -38,7 +38,7 @@ class symmetric_coroutine
|
||||
{
|
||||
private:
|
||||
template< typename X >
|
||||
friend class detail::symmetric_coroutine_self;
|
||||
friend class detail::symmetric_coroutine_yield;
|
||||
|
||||
typedef detail::symmetric_coroutine_impl< Arg > impl_type;
|
||||
typedef detail::parameters< Arg > param_type;
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
|
||||
public:
|
||||
typedef Arg value_type;
|
||||
typedef detail::symmetric_coroutine_self< Arg > self_type;
|
||||
typedef detail::symmetric_coroutine_yield< Arg > yield_type;
|
||||
|
||||
symmetric_coroutine() BOOST_NOEXCEPT :
|
||||
impl_( 0),
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# ifdef BOOST_MSVC
|
||||
typedef void ( * coroutine_fn)( self_type &);
|
||||
typedef void ( * coroutine_fn)( yield_type &);
|
||||
|
||||
explicit symmetric_coroutine( coroutine_fn fn,
|
||||
attributes const& attr = attributes() ) :
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -325,7 +325,7 @@ class symmetric_coroutine< Arg &, StackAllocator >
|
||||
{
|
||||
private:
|
||||
template< typename X >
|
||||
friend class detail::symmetric_coroutine_self;
|
||||
friend class detail::symmetric_coroutine_yield;
|
||||
|
||||
typedef detail::symmetric_coroutine_impl< Arg & > impl_type;
|
||||
typedef detail::parameters< Arg & > param_type;
|
||||
@@ -342,7 +342,7 @@ private:
|
||||
|
||||
public:
|
||||
typedef Arg value_type;
|
||||
typedef detail::symmetric_coroutine_self< Arg & > self_type;
|
||||
typedef detail::symmetric_coroutine_yield< Arg & > yield_type;
|
||||
|
||||
symmetric_coroutine() BOOST_NOEXCEPT :
|
||||
impl_( 0),
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# ifdef BOOST_MSVC
|
||||
typedef void ( * coroutine_fn)( self_type &);
|
||||
typedef void ( * coroutine_fn)( yield_type &);
|
||||
|
||||
explicit symmetric_coroutine( coroutine_fn fn,
|
||||
attributes const& attr = attributes() ) :
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -433,7 +433,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -459,7 +459,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -485,7 +485,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -538,7 +538,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline< Fn, impl_type, self_type >,
|
||||
detail::trampoline< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -604,7 +604,7 @@ class symmetric_coroutine< void, StackAllocator >
|
||||
{
|
||||
private:
|
||||
template< typename X >
|
||||
friend class detail::symmetric_coroutine_self;
|
||||
friend class detail::symmetric_coroutine_yield;
|
||||
|
||||
typedef detail::symmetric_coroutine_impl< void > impl_type;
|
||||
typedef detail::parameters< void > param_type;
|
||||
@@ -621,7 +621,7 @@ private:
|
||||
|
||||
public:
|
||||
typedef void value_type;
|
||||
typedef detail::symmetric_coroutine_self< void > self_type;
|
||||
typedef detail::symmetric_coroutine_yield< void > yield_type;
|
||||
|
||||
symmetric_coroutine() BOOST_NOEXCEPT :
|
||||
impl_( 0),
|
||||
@@ -633,7 +633,7 @@ public:
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# ifdef BOOST_MSVC
|
||||
typedef void ( * coroutine_fn)( self_type &);
|
||||
typedef void ( * coroutine_fn)( yield_type &);
|
||||
|
||||
explicit symmetric_coroutine( coroutine_fn fn,
|
||||
attributes const& attr = attributes() ) :
|
||||
@@ -645,7 +645,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline_void< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< coroutine_fn, impl_type, self_type >,
|
||||
detail::trampoline_void< coroutine_fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< coroutine_fn > to( forward< coroutine_fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -712,7 +712,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( forward< Fn >( fn), & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -790,7 +790,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
@@ -817,7 +817,7 @@ public:
|
||||
{
|
||||
stack_alloc_.allocate( stack_ctx_, attr.size);
|
||||
callee_ = detail::coroutine_context(
|
||||
detail::trampoline_void< Fn, impl_type, self_type >,
|
||||
detail::trampoline_void< Fn, impl_type, yield_type >,
|
||||
& stack_ctx_);
|
||||
detail::setup< Fn > to( fn, & caller_, & callee_, attr);
|
||||
impl_ = reinterpret_cast< impl_type * >(
|
||||
|
||||
Reference in New Issue
Block a user