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
89  : _Coro(nullptr)
90  {
91  }
coroutine_handle< promise_type > _Coro
Definition: generator:87
template<typename _Ty , typename _Alloc = allocator<char>>
experimental::generator< _Ty, _Alloc >::iterator::iterator ( coroutine_handle< promise_type _CoroArg)
inline
93  : _Coro(_CoroArg)
94  {
95  }
coroutine_handle< promise_type > _Coro
Definition: generator:87

Member Function Documentation

template<typename _Ty , typename _Alloc = allocator<char>>
bool experimental::generator< _Ty, _Alloc >::iterator::operator!= ( iterator const &  _Right) const
inline
122  {
123  return !(*this == _Right);
124  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Ty , typename _Alloc = allocator<char>>
_Ty const& experimental::generator< _Ty, _Alloc >::iterator::operator* ( ) const
inline
127  {
128  return *_Coro.promise()._CurrentValue;
129  }
coroutine_handle< promise_type > _Coro
Definition: generator:87
template<typename _Ty , typename _Alloc = allocator<char>>
iterator& experimental::generator< _Ty, _Alloc >::iterator::operator++ ( )
inline
98  {
99  _Coro.resume();
100  if (_Coro.done())
101  _Coro = nullptr;
102  return *this;
103  }
coroutine_handle< promise_type > _Coro
Definition: generator:87
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
132  {
133  return _STD addressof(operator*());
134  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
template<typename _Ty , typename _Alloc = allocator<char>>
bool experimental::generator< _Ty, _Alloc >::iterator::operator== ( iterator const &  _Right) const
inline
117  {
118  return _Coro == _Right._Coro;
119  }
coroutine_handle< promise_type > _Coro
Definition: generator:87
constexpr const _Ty &() _Right
Definition: algorithm:3723

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: