mp-coro main
Coroutine support tools
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
generator< T >::iterator Class Reference

#include <mp-coro/generator.h>

Detailed Description

template<typename T>
class mp_coro::generator< T >::iterator

Definition at line 76 of file generator.h.

+ Collaboration diagram for generator< T >::iterator:

Public Types

using value_type = generator::value_type
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 iterator ()=default
 
 iterator (iterator &&other) noexcept
 
iteratoroperator= (iterator &&other) noexcept
 
iteratoroperator++ ()
 
void operator++ (int)
 
reference operator* () const noexcept
 
pointer operator-> () const noexcept
 
bool operator== (std::default_sentinel_t) const noexcept
 

Private Member Functions

 iterator (std::coroutine_handle< promise_type > h) noexcept
 

Private Attributes

std::coroutine_handle< promise_typehandle_
 
friend generator
 

Member Typedef Documentation

◆ value_type

Definition at line 82 of file generator.h.

◆ difference_type

using difference_type = std::ptrdiff_t

Definition at line 83 of file generator.h.

Constructor & Destructor Documentation

◆ iterator() [1/3]

iterator ( std::coroutine_handle< promise_type h)
inlineexplicitprivatenoexcept

Definition at line 79 of file generator.h.

◆ iterator() [2/3]

iterator ( )
default

◆ iterator() [3/3]

iterator ( iterator &&  other)
inlinenoexcept

Definition at line 87 of file generator.h.

Member Function Documentation

◆ operator=()

iterator & operator= ( iterator &&  other)
inlinenoexcept

Definition at line 88 of file generator.h.

◆ operator++() [1/2]

iterator & operator++ ( )
inline

Definition at line 93 of file generator.h.

◆ operator++() [2/2]

void operator++ ( int  )
inline

Definition at line 99 of file generator.h.

◆ operator*()

reference operator* ( ) const
inlinenoexcept

Definition at line 104 of file generator.h.

◆ operator->()

pointer operator-> ( ) const
inlinenoexcept

Definition at line 109 of file generator.h.

◆ operator==()

bool operator== ( std::default_sentinel_t  ) const
inlinenoexcept

Definition at line 114 of file generator.h.

Member Data Documentation

◆ handle_

std::coroutine_handle<promise_type> handle_
private

Definition at line 77 of file generator.h.

◆ generator

friend generator
private

Definition at line 78 of file generator.h.


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