C++ Library Extensions 2022.12.09
To help learn modern C++ programming
PromiseType< SemanticReturnType > Class Template Reference

#include <032-coroutine.hpp>

Public Types

using resumable_type = ResumableType< SemanticReturnType >
 
using promise_handle_type = std::experimental::coroutine_handle< PromiseType >
 

Public Member Functions

auto get_return_object ()
 
void unhandled_exception ()
 
auto initial_suspend ()
 
auto final_suspend ()
 
auto return_value (SemanticReturnType value)
 
auto yield_value (SemanticReturnType value)
 

Static Public Member Functions

static auto get_return_object_on_allocation_failure ()
 

Friends

template<typename Type >
class ResumableType
 

Detailed Description

template<typename SemanticReturnType>
class PromiseType< SemanticReturnType >

Definition at line 56 of file 032-coroutine.hpp.

Member Typedef Documentation

◆ promise_handle_type

template<typename SemanticReturnType >
using PromiseType< SemanticReturnType >::promise_handle_type = std::experimental::coroutine_handle<PromiseType>

Definition at line 65 of file 032-coroutine.hpp.

◆ resumable_type

template<typename SemanticReturnType >
using PromiseType< SemanticReturnType >::resumable_type = ResumableType<SemanticReturnType>

Definition at line 63 of file 032-coroutine.hpp.

Member Function Documentation

◆ final_suspend()

template<typename SemanticReturnType >
auto PromiseType< SemanticReturnType >::final_suspend ( )
inline

Definition at line 104 of file 032-coroutine.hpp.

◆ get_return_object()

template<typename SemanticReturnType >
auto PromiseType< SemanticReturnType >::get_return_object ( )
inline

Definition at line 79 of file 032-coroutine.hpp.

◆ get_return_object_on_allocation_failure()

template<typename SemanticReturnType >
static auto PromiseType< SemanticReturnType >::get_return_object_on_allocation_failure ( )
inlinestatic

Definition at line 86 of file 032-coroutine.hpp.

◆ initial_suspend()

template<typename SemanticReturnType >
auto PromiseType< SemanticReturnType >::initial_suspend ( )
inline

Definition at line 98 of file 032-coroutine.hpp.

◆ return_value()

template<typename SemanticReturnType >
auto PromiseType< SemanticReturnType >::return_value ( SemanticReturnType  value)
inline

Definition at line 110 of file 032-coroutine.hpp.

◆ unhandled_exception()

template<typename SemanticReturnType >
void PromiseType< SemanticReturnType >::unhandled_exception ( )
inline

Definition at line 92 of file 032-coroutine.hpp.

◆ yield_value()

template<typename SemanticReturnType >
auto PromiseType< SemanticReturnType >::yield_value ( SemanticReturnType  value)
inline

Definition at line 119 of file 032-coroutine.hpp.

Friends And Related Function Documentation

◆ ResumableType

template<typename SemanticReturnType >
template<typename Type >
friend class ResumableType
friend

Definition at line 58 of file 032-coroutine.hpp.


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