std::coroutine_handle<Promise>::from_promise
cppreference.net에서
static coroutine_handle from_promise( Promise& p );
|
(C++20부터) | |
코루틴의 프로미스 객체로부터 coroutine_handle를 생성합니다. 생성된 coroutine_handle는 코루틴을 참조하며, promise()는 p에 대한 참조를 반환합니다.
p가 프로미스 객체에 대한 참조가 아닌 경우 동작은 정의되지 않습니다. 이 함수는 기본 템플릿에만 제공되며, 특수화 std::coroutine_handle<> 및 std::coroutine_handle<std::noop_coroutine_promise>에는 이 함수가 없습니다.
매개변수
| p | - | 코루틴이 참조할 promise 객체 |
반환값
주어진 코루틴을 참조하는
coroutine_handle
입니다.
예제
|
이 섹션은 불완전합니다
이유: 예제가 없음 |
참고 항목
coroutine_handle
객체를 생성합니다
(public member function) |
|
|
[static]
|
포인터로부터 코루틴을 가져옵니다
(public static member function) |
|
(C++20)
|
재개되거나 파괴될 때 관찰 가능한 효과가 없는 코루틴 핸들을 생성합니다
(function) |