libcoro  1.0
Coroutine support library for C++20
Public Member Functions | List of all members
coro::when_each< T >::iterator Class Reference

iterator for when_each - it always return awaitable reference (future) More...

#include <future_list.h>

+ Collaboration diagram for coro::when_each< T >::iterator:

Public Member Functions

 iterator ()=default
 default construct - note such iterator cannot be used for iterating More...
 
result_future_typeoperator* () const
 retrieve item. Note that result is awaitable reference. You need co_await the result; More...
 
iteratoroperator++ ()
 go to next item More...
 
iterator operator++ (int)
 go to next item More...
 
iteratoroperator-- ()
 go to previous item More...
 
iterator operator-- (int)
 go to previous item More...
 
iteratoroperator+= (std::ptrdiff_t n)
 skip n items More...
 
iteratoroperator-= (std::ptrdiff_t n)
 skip n items More...
 
std::ptrdiff_t operator- (const iterator &other) const
 difference More...
 
bool operator== (const iterator &other) const
 comparison More...
 

Detailed Description

template<typename T>
class coro::when_each< T >::iterator

iterator for when_each - it always return awaitable reference (future)

The iterator is random access iterator. Underlying container is ordered in order of completion. You can access not yet complete item, you only need to co_await on it. Once the item is complete, you can retrieve its value.

Definition at line 193 of file future_list.h.


The documentation for this class was generated from the following file: