STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
experimental::coroutine_handle< _PromiseT > Struct Template Reference

Public Member Functions

 coroutine_handle () _NOEXCEPT=default
 
 __declspec (deprecated("with pointer parameter is deprecated. Use coroutine_handle::from_promise(T&) instead")) static coroutine_handle from_promise(_PromiseT *_Prom) _NOEXCEPT
 
coroutine_handleoperator= (nullptr_t) _NOEXCEPT
 
_PromiseT & promise () _NOEXCEPT
 
_PromiseT const & promise () const _NOEXCEPT
 

Static Public Member Functions

static coroutine_handle from_promise (_PromiseT &_Prom) _NOEXCEPT
 

Static Public Attributes

static const size_t _ALIGN_REQ = sizeof(void *) * 2
 
static const size_t _ALIGNED_SIZE
 

Constructor & Destructor Documentation

template<typename _PromiseT>
experimental::coroutine_handle< _PromiseT >::coroutine_handle ( )
default

Member Function Documentation

template<typename _PromiseT>
experimental::coroutine_handle< _PromiseT >::__declspec ( deprecated("with pointer parameter is deprecated. Use coroutine_handle< _PromiseT >::from_promise(T&) instead")  )
inline
134  {
135  return from_promise(*_Prom);
136  }
static coroutine_handle from_promise(_PromiseT &_Prom) _NOEXCEPT
Definition: resumable:138
template<typename _PromiseT>
static coroutine_handle experimental::coroutine_handle< _PromiseT >::from_promise ( _PromiseT &  _Prom)
inlinestatic
139  {
140  auto _FramePtr = reinterpret_cast<char *>(_STD addressof(_Prom)) + _ALIGNED_SIZE;
141  coroutine_handle<_PromiseT> _Result;
142  _Result._Ptr =
143  reinterpret_cast<_Resumable_frame_prefix *>(_FramePtr);
144  return _Result;
145  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
static const size_t _ALIGNED_SIZE
Definition: resumable:155
template<typename _PromiseT>
coroutine_handle& experimental::coroutine_handle< _PromiseT >::operator= ( nullptr_t  )
inline
148  {
149  _Ptr = nullptr;
150  return *this;
151  }
template<typename _PromiseT>
_PromiseT& experimental::coroutine_handle< _PromiseT >::promise ( )
inline
161  {
162  return *reinterpret_cast<_PromiseT *>(
163  reinterpret_cast<char *>(_Ptr) - _ALIGNED_SIZE);
164  }
static const size_t _ALIGNED_SIZE
Definition: resumable:155
template<typename _PromiseT>
_PromiseT const& experimental::coroutine_handle< _PromiseT >::promise ( ) const
inline
167  {
168  return *reinterpret_cast<_PromiseT const *>(
169  reinterpret_cast<char const *>(_Ptr) - _ALIGNED_SIZE);
170  }
static const size_t _ALIGNED_SIZE
Definition: resumable:155

Member Data Documentation

template<typename _PromiseT>
const size_t experimental::coroutine_handle< _PromiseT >::_ALIGN_REQ = sizeof(void *) * 2
static
template<typename _PromiseT>
const size_t experimental::coroutine_handle< _PromiseT >::_ALIGNED_SIZE
static
Initial value:
=
? 0
: ((sizeof(_PromiseT) + _ALIGN_REQ - 1) & ~(_ALIGN_REQ - 1))

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