Namespaces
Variants

std:: suspend_always

From cppreference.net
Utilities library
Coroutine support
Coroutine traits
Coroutine handle
No-op coroutines
Trivial awaitables
suspend_always
(C++20)
Range generators
(C++23)
헤더 파일에 정의됨 <coroutine>
struct suspend_always ;
(C++20 이후)

suspend_always await 표현식 이 항상 일시 중단되고 값을 생성하지 않음을 나타내는 데 사용할 수 있는 빈 클래스입니다.

목차

멤버 함수

await_ready
await 표현식이 항상 일시 중단됨을 나타냄
(public member function)
await_suspend
no-op
(public member function)
await_resume
no-op
(public member function)

std::suspend_always:: await_ready

constexpr bool await_ready ( ) const noexcept { return false ; }

항상 false 를 반환하며, 이는 await 표현식이 항상 일시 중단됨을 나타냅니다.

std::suspend_always:: await_suspend

constexpr void await_suspend ( std:: coroutine_handle <> ) const noexcept { }

아무 작업도 수행하지 않습니다.

std::suspend_always:: await_resume

constexpr void await_resume ( ) const noexcept { }

아무 작업도 수행하지 않습니다. suspend_always 가 사용되면 await 표현식은 값을 생성하지 않습니다.

예제

참고 항목

await-expression이 절대 일시 중단되지 않아야 함을 나타냄
(클래스)