STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Static Public Member Functions | List of all members
experimental::_Resumable_helper_traits< _Ret, _Ts > Struct Template Reference

Public Types

using _Traits = coroutine_traits< _Ret, _Ts...>
 
using _PromiseT = typename _Traits::promise_type
 
using _Handle_type = coroutine_handle< _PromiseT >
 

Static Public Member Functions

static _PromiseT_Promise_from_frame (void *_Addr) _NOEXCEPT
 
static _Handle_type _Handle_from_frame (void *_Addr) _NOEXCEPT
 
static void _Set_exception (void *_Addr)
 
static void _ConstructPromise (void *_Addr, void *_Resume_addr, int _HeapElision)
 
static void _DestructPromise (void *_Addr)
 

Member Typedef Documentation

template<typename _Ret , typename... _Ts>
using experimental::_Resumable_helper_traits< _Ret, _Ts >::_Handle_type = coroutine_handle<_PromiseT>
template<typename _Ret , typename... _Ts>
using experimental::_Resumable_helper_traits< _Ret, _Ts >::_PromiseT = typename _Traits::promise_type
template<typename _Ret , typename... _Ts>
using experimental::_Resumable_helper_traits< _Ret, _Ts >::_Traits = coroutine_traits<_Ret, _Ts...>

Member Function Documentation

template<typename _Ret , typename... _Ts>
static void experimental::_Resumable_helper_traits< _Ret, _Ts >::_ConstructPromise ( void _Addr,
void _Resume_addr,
int  _HeapElision 
)
inlinestatic
272  {
273  *reinterpret_cast<void **>(_Addr) = _Resume_addr;
274  *reinterpret_cast<uint32_t *>(reinterpret_cast<uintptr_t>(_Addr) + sizeof(void *))
275  = 2 + (_HeapElision ? 0 : 0x10000);
276  auto _Prom = _Promise_from_frame(_Addr);
277  ::new (static_cast<void *>(_Prom)) _PromiseT();
278  }
static _PromiseT * _Promise_from_frame(void *_Addr) _NOEXCEPT
Definition: resumable:255
unsigned int uintptr_t
Definition: vadefs.h:30
unsigned int uint32_t
Definition: stdint.h:23
typename _Traits::promise_type _PromiseT
Definition: resumable:252
template<typename _Ret , typename... _Ts>
static void experimental::_Resumable_helper_traits< _Ret, _Ts >::_DestructPromise ( void _Addr)
inlinestatic
281  {
282  _Promise_from_frame(_Addr)->~_PromiseT();
283  }
static _PromiseT * _Promise_from_frame(void *_Addr) _NOEXCEPT
Definition: resumable:255
template<typename _Ret , typename... _Ts>
static _Handle_type experimental::_Resumable_helper_traits< _Ret, _Ts >::_Handle_from_frame ( void _Addr)
inlinestatic
262  {
264  }
static _PromiseT * _Promise_from_frame(void *_Addr) _NOEXCEPT
Definition: resumable:255
static coroutine_handle from_promise(_PromiseT &_Prom) _NOEXCEPT
Definition: resumable:140
template<typename _Ret , typename... _Ts>
static _PromiseT* experimental::_Resumable_helper_traits< _Ret, _Ts >::_Promise_from_frame ( void _Addr)
inlinestatic
256  {
257  return reinterpret_cast<_PromiseT *>(
258  reinterpret_cast<char *>(_Addr) - _Handle_type::_ALIGNED_SIZE);
259  }
static const size_t _ALIGNED_SIZE
Definition: resumable:157
typename _Traits::promise_type _PromiseT
Definition: resumable:252
template<typename _Ret , typename... _Ts>
static void experimental::_Resumable_helper_traits< _Ret, _Ts >::_Set_exception ( void _Addr)
inlinestatic
267  {
268  _Promise_from_frame(_Addr)->set_exception(_STD current_exception());
269  }
static _PromiseT * _Promise_from_frame(void *_Addr) _NOEXCEPT
Definition: resumable:255
exception_ptr current_exception() _NOEXCEPT
Definition: exception:366

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