![]() |
Home | Libraries | People | FAQ | More |
#include <boost/coroutine/symmetric_coroutine.hpp> template< typename Arg > class symmetric_coroutine<>::call_type { public: call_type() noexcept; template< typename Fn > call_type( Fn && fn, attributes const& attr = attributes() ); template< typename Fn, typename StackAllocator > call_type( Fn && fn, attributes const& attr, StackAllocator stack_alloc); ~call_type(); call_type( call_type const& other)=delete; call_type & operator=( call_type const& other)=delete; call_type( call_type && other) noexcept; call_type & operator=( call_type && other) noexcept; operator unspecified-bool-type() const; bool operator!() const noexcept; void swap( call_type & other) noexcept; call_type & operator()( Arg arg) noexcept; }; template< typename Arg > void swap( symmetric_coroutine< Arg >::call_type & l, symmetric_coroutine< Arg >::call_type & r);
call_type()
Creates a coroutine representing not-a-coroutine.
Nothing.
template< typename Fn
> call_type( Fn fn, attributes const& attr)
size >= minimum_stacksize(),
size <= maximum_stacksize()
when ! is_stack_unbounded().
Creates a coroutine which will execute fn.
Argument attr determines
stack clean-up and preserving floating-point registers. For allocating/deallocating
the stack stack_alloc
is used.
template< typename Fn, typename StackAllocator >
call_type(
Fn &&
fn,
attributes const& attr, StackAllocator
const&
stack_alloc)
size >= minimum_stacksize(),
size <= maximum_stacksize()
when ! is_stack_unbounded().
Creates a coroutine which will execute fn.
Argument attr determines
stack clean-up and preserving floating-point registers. For allocating/deallocating
the stack stack_alloc
is used.
~call_type()
Destroys the context and deallocates the stack.
call_type(
call_type &&
other)
Moves the internal data of other
to *this.
other becomes not-a-coroutine.
Nothing.
call_type &
operator=(
call_type &&
other)
Destroys the internal data of *this and moves the internal data of
other to *this.
other becomes not-a-coroutine.
Nothing.
operator unspecified-bool-type() const
If *this
refers to not-a-coroutine or the coroutine-function
has returned (completed), the function returns false.
Otherwise true.
Nothing.
bool operator!() const
If *this
refers to not-a-coroutine or the coroutine-function
has returned (completed), the function returns true.
Otherwise false.
Nothing.
void swap( call_type
& other)
Swaps the internal data from *this with the values of other.
Nothing.
call_type &
operator()(Arg arg)
symmetric_coroutine::call_type& coroutine<Arg,StackAllocator>::call_type::operator()(Arg); symmetric_coroutine::call_type& coroutine<Arg&,StackAllocator>::call_type::operator()(Arg&); symmetric_coroutine::call_type& coroutine<void,StackAllocator>::call_type::operator()();
operator unspecified-bool-type() returns true
for *this.
Execution control is transferred to coroutine-function
and the argument arg
is passed to the coroutine-function.
Nothing.
swap()
template< typename Arg > void swap( symmetric_coroutine< Arg >::call_type & l, symmetric_coroutine< Arg >::call_type & r);
As if 'l.swap( r)'.