std::suspend_always 定义于头文件<coroutine> structsuspend_always; (C++20 起) suspend_always是空类,能用于指示await 表达式始终暂停并且不产生值。 成员函数 await_ready (C++20) 指示await 表达式始终暂停 (公开成员函数) await_suspend (C++20)
std::suspend_always::await_ready constexprboolawait_ready()constnoexcept{returnfalse;} Always returnsfalse, indicating that an await expression always suspends. std::suspend_always::await_suspend constexprvoidawait_suspend(std::coroutine_handle<>)constnoexcept{} ...