std::coroutine_handle<Promise>:: from_promise
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Coroutine traits | ||||
|
(C++20)
|
||||
| Coroutine handle | ||||
|
(C++20)
|
||||
| No-op coroutines | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Trivial awaitables | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Range generators | ||||
|
(C++23)
|
| Member functions | ||||
|
coroutine_handle::from_promise
|
||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
static
coroutine_handle from_promise
(
Promise
&
p
)
;
|
(C++20부터) | |
코루틴의 promise 객체로부터
coroutine_handle
를 생성합니다. 생성된
coroutine_handle
는 해당 코루틴을 참조하며,
promise()
는
p
에 대한 참조를 반환합니다.
p 가 promise 객체에 대한 참조가 아닌 경우 동작은 정의되지 않습니다. 이 함수는 기본 템플릿에 대해서만 제공되며, 즉 특수화된 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) |