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
136  {
137  return from_promise(*_Prom);
138  }
static coroutine_handle from_promise(_PromiseT &_Prom) _NOEXCEPT
Definition: resumable:140
template<typename _PromiseT>
static coroutine_handle experimental::coroutine_handle< _PromiseT >::from_promise ( _PromiseT &  _Prom)
inlinestatic
141  {
142  auto _FramePtr = reinterpret_cast<char *>(_STD addressof(_Prom)) + _ALIGNED_SIZE;
143  coroutine_handle<_PromiseT> _Result;
144  _Result._Ptr =
145  reinterpret_cast<_Resumable_frame_prefix *>(_FramePtr);
146  return _Result;
147  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
static const size_t _ALIGNED_SIZE
Definition: resumable:157
_Result
Definition: corecrt_wconio.h:362
template<typename _PromiseT>
coroutine_handle& experimental::coroutine_handle< _PromiseT >::operator= ( nullptr_t  )
inline
150  {
151  _Ptr = nullptr;
152  return *this;
153  }
template<typename _PromiseT>
_PromiseT& experimental::coroutine_handle< _PromiseT >::promise ( )
inline
163  {
164  return *reinterpret_cast<_PromiseT *>(
165  reinterpret_cast<char *>(_Ptr) - _ALIGNED_SIZE);
166  }
static const size_t _ALIGNED_SIZE
Definition: resumable:157
template<typename _PromiseT>
_PromiseT const& experimental::coroutine_handle< _PromiseT >::promise ( ) const
inline
169  {
170  return *reinterpret_cast<_PromiseT const *>(
171  reinterpret_cast<char const *>(_Ptr) - _ALIGNED_SIZE);
172  }
static const size_t _ALIGNED_SIZE
Definition: resumable:157

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: