std::suspend_never
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Utilities library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
  
 
 
 Type support (basic types, RTTI)
 Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
 Coroutine support (C++20)
 Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
  (C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
 General utilities
 Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)
  (C++20)(C++20)(C++20)
(C++20)
 Swap and type operations 
 Common vocabulary types
Coroutine support 
 
 
 
 
 
 
 
 Coroutine traits
(C++20)
 Coroutine handle
(C++20)
 No-op coroutines
(C++20)
(C++20)
 Trivial awaitables
suspend_never
(C++20)
(C++20)
 Range generators
(C++23)
Defined in header 
 
 
<coroutine> 
 struct suspend_never;
 
 (since C++20) 
suspend_never is an empty class which can be used to indicate that an await expression never suspends and does not produce a value.
Contents
[edit] Member functions
await_ready
(public member function)
await_suspend
(public member function)
await_resume
(public member function)
std::suspend_never::await_ready
constexpr bool await_ready() const noexcept { return true; }
 
 
Always returns true, indicating that an await expression never suspends.
std::suspend_never::await_suspend
constexpr void await_suspend( std::coroutine_handle <> ) const noexcept {}
 
 
Does nothing.
std::suspend_never::await_resume
constexpr void await_resume() const noexcept {}
 
 
Does nothing. An await expression does not produce a value if suspend_never is used.
[edit] Example
 This section is incomplete
Reason: no example
Reason: no example