STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
experimental::generator< _Ty, _Alloc >::iterator Struct Reference
Inheritance diagram for experimental::generator< _Ty, _Alloc >::iterator:

Public Member Functions

 iterator (nullptr_t)
 
 iterator (coroutine_handle< promise_type > _CoroArg)
 
iteratoroperator++ ()
 
iterator operator++ (int)=delete
 
bool operator== (iterator const &_Right) const
 
bool operator!= (iterator const &_Right) const
 
_Ty const & operator* () const
 
_Ty const * operator-> () const
 

Public Attributes

coroutine_handle< promise_type_Coro
 

Constructor & Destructor Documentation

template<typename _Ty , typename _Alloc = allocator<char>>
experimental::generator< _Ty, _Alloc >::iterator::iterator ( nullptr_t  )
inline
87  : _Coro(nullptr)
88  {
89  }
coroutine_handle< promise_type > _Coro
Definition: generator:85
template<typename _Ty , typename _Alloc = allocator<char>>
experimental::generator< _Ty, _Alloc >::iterator::iterator ( coroutine_handle< promise_type _CoroArg)
inline
91  : _Coro(_CoroArg)
92  {
93  }
coroutine_handle< promise_type > _Coro
Definition: generator:85

Member Function Documentation

template<typename _Ty , typename _Alloc = allocator<char>>
bool experimental::generator< _Ty, _Alloc >::iterator::operator!= ( iterator const &  _Right) const
inline
120  {
121  return !(*this == _Right);
122  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<typename _Ty , typename _Alloc = allocator<char>>
_Ty const& experimental::generator< _Ty, _Alloc >::iterator::operator* ( ) const
inline
125  {
126  return *_Coro.promise()._CurrentValue;
127  }
coroutine_handle< promise_type > _Coro
Definition: generator:85
template<typename _Ty , typename _Alloc = allocator<char>>
iterator& experimental::generator< _Ty, _Alloc >::iterator::operator++ ( )
inline
96  {
97  _Coro.resume();
98  if (_Coro.done())
99  _Coro = nullptr;
100  return *this;
101  }
coroutine_handle< promise_type > _Coro
Definition: generator:85
template<typename _Ty , typename _Alloc = allocator<char>>
iterator experimental::generator< _Ty, _Alloc >::iterator::operator++ ( int  )
delete
template<typename _Ty , typename _Alloc = allocator<char>>
_Ty const* experimental::generator< _Ty, _Alloc >::iterator::operator-> ( ) const
inline
130  {
131  return _STD addressof(operator*());
132  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
template<typename _Ty , typename _Alloc = allocator<char>>
bool experimental::generator< _Ty, _Alloc >::iterator::operator== ( iterator const &  _Right) const
inline
115  {
116  return _Coro == _Right._Coro;
117  }
coroutine_handle< promise_type > _Coro
Definition: generator:85
constexpr const _Ty &() _Right
Definition: algorithm:3591

Member Data Documentation

template<typename _Ty , typename _Alloc = allocator<char>>
coroutine_handle<promise_type> experimental::generator< _Ty, _Alloc >::iterator::_Coro

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