std::suspend_always
来自cppreference.com
                    
                                        
                    
                    
                                                            
                    |   定义于头文件  <coroutine>
  | 
||
|   struct suspend_always;  | 
(C++20 起) | |
suspend_always 是空类,能用于指示 await 表达式始终暂停并且不产生值。
成员函数
|    await_ready (C++20)  | 
   指示 await 表达式始终暂停  (公开成员函数)  | 
|    await_suspend (C++20)  | 
   无操作  (公开成员函数)  | 
|    await_resume (C++20)  | 
   无操作  (公开成员函数)  | 
std::suspend_always::await_ready
|   constexpr bool await_ready() const noexcept { return false; }  | 
(C++20 起) | |
始终返回 false ,指示 await 表达式始终暂停。
std::suspend_always::await_suspend
|   constexpr void await_suspend() const noexcept {}  | 
(C++20 起) | |
不做任何事。
std::suspend_always::await_resume
|   constexpr void await_resume() const noexcept {}  | 
(C++20 起) | |
不做任何事。若使用 suspend_always 则 await 表达式不产生值。
示例
| 本节未完成 原因:暂无示例  | 
参阅
|    (C++20)  | 
   指示 await 表达式应该决不暂停   (类)  |