Я пробовал std :: enable_if < /code> и требует < /code>: < /p>
template
struct promise_type {
auto get_return_object() {/*...*/}
auto initial_suspend() {/*...*/}
auto return_void()
-> std::enable_if_t {/*...*/}
auto return_value(Ret)
-> std::enable_if_t> {/*...*/}
void unhandled_exception() {/*...*/}
auto final_suspend() noexcept {/*...*/}
// Rest of promise_type's definition ...
};
< /code>
Как это исправить? < /p>
Подробнее здесь: https://stackoverflow.com/questions/795 ... ditionally