ORIGINAL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
original::coroutine::generator< TYPE >::iterator Class Reference

Input iterator for generator range-based operations. More...

#include <coroutines.h>

Collaboration diagram for original::coroutine::generator< TYPE >::iterator:
Collaboration graph

Public Member Functions

iteratoroperator++ ()
 Advances iterator to next value.
 
TYPE operator* ()
 Dereferences iterator to get current value.
 
bool operator!= (const iterator &other) const
 Checks iterator inequality.
 
bool operator== (const iterator &other) const
 Checks iterator equality.
 

Public Attributes

friend coroutine
 

Detailed Description

template<typename TYPE>
class original::coroutine::generator< TYPE >::iterator

Input iterator for generator range-based operations.

Provides input iterator interface for using generator with range-based for loops and STL algorithms.

Iterator invalidation:

Member Function Documentation

◆ operator!=()

template<typename TYPE >
bool original::coroutine::generator< TYPE >::iterator::operator!= ( const iterator other) const

Checks iterator inequality.

Parameters
otherIterator to compare with
Returns
true if iterators are not equal

◆ operator*()

template<typename TYPE >
TYPE original::coroutine::generator< TYPE >::iterator::operator* ( )

Dereferences iterator to get current value.

Returns
Current value from generator
Exceptions
nullPointerErrorif dereferencing end iterator

◆ operator++()

template<typename TYPE >
original::coroutine::generator< TYPE >::iterator & original::coroutine::generator< TYPE >::iterator::operator++ ( )

Advances iterator to next value.

Returns
Reference to this iterator
Note
Calls generator::next() internally

◆ operator==()

template<typename TYPE >
bool original::coroutine::generator< TYPE >::iterator::operator== ( const iterator other) const

Checks iterator equality.

Parameters
otherIterator to compare with
Returns
true if iterators are equal

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