mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-11 13:34:08 +00:00
fix coroutine2 reference of pull_type and push_type
This commit is contained in:
parent
c1c403290c
commit
f9dff912df
@ -390,13 +390,11 @@ resumed with __push_coro_op__, __pull_coro_op__).]
|
|||||||
class coroutine<>::pull_type
|
class coroutine<>::pull_type
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
pull_type() noexcept;
|
|
||||||
|
|
||||||
template< typename Fn >
|
template< typename Fn >
|
||||||
pull_type( Fn && fn, attributes const& attr = attributes() );
|
pull_type( Fn && fn);
|
||||||
|
|
||||||
template< typename Fn, typename StackAllocator >
|
template< typename StackAllocator, typename Fn >
|
||||||
pull_type( Fn && fn, attributes const& attr, StackAllocator stack_alloc);
|
pull_type( StackAllocator stack_alloc, Fn && fn);
|
||||||
|
|
||||||
pull_type( pull_type const& other)=delete;
|
pull_type( pull_type const& other)=delete;
|
||||||
|
|
||||||
@ -408,50 +406,32 @@ resumed with __push_coro_op__, __pull_coro_op__).]
|
|||||||
|
|
||||||
pull_type & operator=( pull_type && other) noexcept;
|
pull_type & operator=( pull_type && other) noexcept;
|
||||||
|
|
||||||
operator unspecified-bool-type() const noexcept;
|
pull_coroutine & operator()();
|
||||||
|
|
||||||
|
explicit operator bool() const noexcept;
|
||||||
|
|
||||||
bool operator!() const noexcept;
|
bool operator!() const noexcept;
|
||||||
|
|
||||||
void swap( pull_type & other) noexcept;
|
R get() noexcept;
|
||||||
|
|
||||||
pull_type & operator()();
|
|
||||||
|
|
||||||
R get() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename R >
|
|
||||||
void swap( pull_type< R > & l, pull_type< R > & r);
|
|
||||||
|
|
||||||
template< typename R >
|
template< typename R >
|
||||||
range_iterator< pull_type< R > >::type begin( pull_type< R > &);
|
range_iterator< pull_type< R > >::type begin( pull_type< R > &);
|
||||||
|
|
||||||
template< typename R >
|
template< typename R >
|
||||||
range_iterator< pull_type< R > >::type end( pull_type< R > &);
|
range_iterator< pull_type< R > >::type end( pull_type< R > &);
|
||||||
|
|
||||||
[heading `pull_type()`]
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [Creates a coroutine representing __not_a_coro__.]]
|
|
||||||
[[Throws:] [Nothing.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading `template< typename Fn >
|
[heading `template< typename Fn >
|
||||||
pull_type( Fn && fn, attributes const& attr)`]
|
pull_type( Fn && fn)`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Preconditions:] [`size` >= minimum_stacksize(), `size` <= maximum_stacksize()
|
[[Effects:] [Creates a coroutine which will execute `fn`, and enters it.]]
|
||||||
when ! is_stack_unbounded().]]
|
|
||||||
[[Effects:] [Creates a coroutine which will execute `fn`, and enters it.
|
|
||||||
Argument `attr` determines stack clean-up and preserving floating-point
|
|
||||||
registers.]]
|
|
||||||
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `template< typename Fn, typename StackAllocator >
|
[heading `template< typename StackAllocator, typename Fn >
|
||||||
pull_type( Fn && fn, attributes const& attr, StackAllocator const& stack_alloc)`]
|
pull_type( StackAllocator const& stack_alloc, Fn && fn)`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Preconditions:] [`size` >= minimum_stacksize(), `size` <= maximum_stacksize()
|
[[Effects:] [Creates a coroutine which will execute `fn`.
|
||||||
when ! is_stack_unbounded().]]
|
|
||||||
[[Effects:] [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.]]
|
For allocating/deallocating the stack `stack_alloc` is used.]]
|
||||||
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
||||||
]
|
]
|
||||||
@ -475,14 +455,14 @@ internal data of `other` to `*this`. `other` becomes __not_a_coro__.]]
|
|||||||
[[Throws:] [Nothing.]]
|
[[Throws:] [Nothing.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `operator unspecified-bool-type() const`]
|
[heading `explicit operator bool() const noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
||||||
has returned (completed), the function returns `false`. Otherwise `true`.]]
|
has returned (completed), the function returns `false`. Otherwise `true`.]]
|
||||||
[[Throws:] [Nothing.]]
|
[[Throws:] [Nothing.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `bool operator!() const`]
|
[heading `bool operator!() const noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
||||||
has returned (completed), the function returns `true`. Otherwise `false`.]]
|
has returned (completed), the function returns `true`. Otherwise `false`.]]
|
||||||
@ -497,7 +477,7 @@ passed to the coroutine-function).]]
|
|||||||
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `R get()`]
|
[heading `R get() noexcept`]
|
||||||
|
|
||||||
R coroutine<R,StackAllocator>::pull_type::get();
|
R coroutine<R,StackAllocator>::pull_type::get();
|
||||||
R& coroutine<R&,StackAllocator>::pull_type::get();
|
R& coroutine<R&,StackAllocator>::pull_type::get();
|
||||||
@ -512,22 +492,6 @@ __push_coro_op__.]]
|
|||||||
the next __pull_coro_op__ call.]]
|
the next __pull_coro_op__ call.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `void swap( pull_type & other)`]
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [Swaps the internal data from `*this` with the values
|
|
||||||
of `other`.]]
|
|
||||||
[[Throws:] [Nothing.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading Non-member function `swap()`]
|
|
||||||
|
|
||||||
template< typename R >
|
|
||||||
void swap( pull_type< R > & l, pull_type< R > & r);
|
|
||||||
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [As if 'l.swap( r)'.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading Non-member function `begin( pull_type< R > &)`]
|
[heading Non-member function `begin( pull_type< R > &)`]
|
||||||
template< typename R >
|
template< typename R >
|
||||||
range_iterator< pull_type< R > >::type begin( pull_type< R > &);
|
range_iterator< pull_type< R > >::type begin( pull_type< R > &);
|
||||||
@ -559,13 +523,11 @@ would return `false`.]]
|
|||||||
class coroutine<>::push_type
|
class coroutine<>::push_type
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
push_type() noexcept;
|
|
||||||
|
|
||||||
template< typename Fn >
|
template< typename Fn >
|
||||||
push_type( Fn && fn, attributes const& attr = attributes() );
|
push_type( Fn && fn);
|
||||||
|
|
||||||
template< typename Fn, typename StackAllocator >
|
template< typename StackAllocator, typename Fn >
|
||||||
push_type( Fn && fn, attributes const& attr, StackAllocator stack_alloc);
|
push_type( StackAllocator stack_alloc, Fn && fn);
|
||||||
|
|
||||||
push_type( push_type const& other)=delete;
|
push_type( push_type const& other)=delete;
|
||||||
|
|
||||||
@ -577,46 +539,29 @@ would return `false`.]]
|
|||||||
|
|
||||||
push_type & operator=( push_type && other) noexcept;
|
push_type & operator=( push_type && other) noexcept;
|
||||||
|
|
||||||
operator unspecified-bool-type() const noexcept;
|
explicit operator bool() const noexcept;
|
||||||
|
|
||||||
bool operator!() const noexcept;
|
bool operator!() const noexcept;
|
||||||
|
|
||||||
void swap( push_type & other) noexcept;
|
|
||||||
|
|
||||||
push_type & operator()( Arg arg);
|
push_type & operator()( Arg arg);
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename Arg >
|
|
||||||
void swap( push_type< Arg > & l, push_type< Arg > & r);
|
|
||||||
|
|
||||||
template< typename Arg >
|
template< typename Arg >
|
||||||
range_iterator< push_type< Arg > >::type begin( push_type< Arg > &);
|
range_iterator< push_type< Arg > >::type begin( push_type< Arg > &);
|
||||||
|
|
||||||
template< typename Arg >
|
template< typename Arg >
|
||||||
range_iterator< push_type< Arg > >::type end( push_type< Arg > &);
|
range_iterator< push_type< Arg > >::type end( push_type< Arg > &);
|
||||||
|
|
||||||
[heading `push_type()`]
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [Creates a coroutine representing __not_a_coro__.]]
|
|
||||||
[[Throws:] [Nothing.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading `template< typename Fn >
|
[heading `template< typename Fn >
|
||||||
push_type( Fn && fn, attributes const& attr)`]
|
push_type( Fn && fn)`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Preconditions:] [`size` >= minimum_stacksize(), `size` <= maximum_stacksize()
|
[[Effects:] [Creates a coroutine which will execute `fn`.]]
|
||||||
when ! is_stack_unbounded().]]
|
|
||||||
[[Effects:] [Creates a coroutine which will execute `fn`. Argument `attr`
|
|
||||||
determines stack clean-up and preserving floating-point registers.]]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `template< typename Fn, typename StackAllocator >
|
[heading `template< typename StackAllocator, typename Fn >
|
||||||
push_type( Fn && fn, attributes const& attr, StackAllocator const& stack_alloc)`]
|
push_type( StackAllocator const& stack_alloc, Fn && fn)`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Preconditions:] [`size` >= minimum_stacksize(), `size` <= maximum_stacksize()
|
[[Effects:] [Creates a coroutine which will execute `fn`.
|
||||||
when ! is_stack_unbounded().]]
|
|
||||||
[[Effects:] [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.]]
|
For allocating/deallocating the stack `stack_alloc` is used.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -625,28 +570,28 @@ For allocating/deallocating the stack `stack_alloc` is used.]]
|
|||||||
[[Effects:] [Destroys the context and deallocates the stack.]]
|
[[Effects:] [Destroys the context and deallocates the stack.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `push_type( push_type && other)`]
|
[heading `push_type( push_type && other) noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Effects:] [Moves the internal data of `other` to `*this`.
|
[[Effects:] [Moves the internal data of `other` to `*this`.
|
||||||
`other` becomes __not_a_coro__.]]
|
`other` becomes __not_a_coro__.]]
|
||||||
[[Throws:] [Nothing.]]
|
[[Throws:] [Nothing.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `push_type & operator=( push_type && other)`]
|
[heading `push_type & operator=( push_type && other) noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Effects:] [Destroys the internal data of `*this` and moves the
|
[[Effects:] [Destroys the internal data of `*this` and moves the
|
||||||
internal data of `other` to `*this`. `other` becomes __not_a_coro__.]]
|
internal data of `other` to `*this`. `other` becomes __not_a_coro__.]]
|
||||||
[[Throws:] [Nothing.]]
|
[[Throws:] [Nothing.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `operator unspecified-bool-type() const`]
|
[heading `explicit operator bool() const noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
||||||
has returned (completed), the function returns `false`. Otherwise `true`.]]
|
has returned (completed), the function returns `false`. Otherwise `true`.]]
|
||||||
[[Throws:] [Nothing.]]
|
[[Throws:] [Nothing.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `bool operator!() const`]
|
[heading `bool operator!() const noexcept`]
|
||||||
[variablelist
|
[variablelist
|
||||||
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
[[Returns:] [If `*this` refers to __not_a_coro__ or the coroutine-function
|
||||||
has returned (completed), the function returns `true`. Otherwise `false`.]]
|
has returned (completed), the function returns `true`. Otherwise `false`.]]
|
||||||
@ -666,22 +611,6 @@ has returned (completed), the function returns `true`. Otherwise `false`.]]
|
|||||||
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
[[Throws:] [Exceptions thrown inside __coro_fn__.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading `void swap( push_type & other)`]
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [Swaps the internal data from `*this` with the values
|
|
||||||
of `other`.]]
|
|
||||||
[[Throws:] [Nothing.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading Non-member function `swap()`]
|
|
||||||
|
|
||||||
template< typename Arg >
|
|
||||||
void swap( push_type< Arg > & l, push_type< Arg > & r);
|
|
||||||
|
|
||||||
[variablelist
|
|
||||||
[[Effects:] [As if 'l.swap( r)'.]]
|
|
||||||
]
|
|
||||||
|
|
||||||
[heading Non-member function `begin( push_type< Arg > &)`]
|
[heading Non-member function `begin( push_type< Arg > &)`]
|
||||||
template< typename Arg >
|
template< typename Arg >
|
||||||
range_iterator< push_type< Arg > >::type begin( push_type< Arg > &);
|
range_iterator< push_type< Arg > >::type begin( push_type< Arg > &);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user