std::coroutine_handle<Promise>:: coroutine_handle
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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::coroutine_handle
|
||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
constexpr
coroutine_handle
(
)
noexcept
;
|
(1) | (C++20부터) |
|
constexpr
coroutine_handle
(
std::
nullptr_t
)
noexcept
;
|
(2) | (C++20부터) |
|
coroutine_handle
(
const
coroutine_handle
&
other
)
=
default
;
|
(3) | (C++20부터) |
|
coroutine_handle
(
coroutine_handle
&&
other
)
=
default
;
|
(4) | (C++20부터) |
코루틴을 참조하지 않는
coroutine_handle
을 생성하거나,
coroutine_handle
을 복사합니다.
ptr
로 초기화합니다. 생성 후,
address()
는
nullptr
를 반환하며, 해당
coroutine_handle
는 코루틴을 참조하지 않습니다. 이러한 생성자들은 특수화
std::
coroutine_handle
<
std::
noop_coroutine_promise
>
에 대해 선언되지 않습니다.
매개변수
| other | - |
복사할 다른
coroutine_handle
|
참고 사항
std:: coroutine_handle < std:: noop_coroutine_promise > 는 기본 생성 가능하지도 않고 std::nullptr_t 로부터 생성 가능하지도 않습니다. std::noop_coroutine 를 사용하여 새로운 std:: coroutine_handle < std:: noop_coroutine_promise > 를 생성할 수 있습니다.
정적 멤버 함수
from_promise
와
from_address
도
coroutine_handle
를 생성할 수 있습니다.
참고 항목
|
[static]
|
코루틴의 promise 객체로부터
coroutine_handle
를 생성합니다
(public static member function) |
|
[static]
|
포인터로부터 코루틴을 임포트합니다
(public static member function) |
|
(C++20)
|
재개되거나 파괴될 때 관찰 가능한 효과가 없는 코루틴 핸들을 생성합니다
(function) |