// // Created by selim on 20.04.2022. // #ifndef AUTOCAT_GNOME_CORO_H #define AUTOCAT_GNOME_CORO_H #include #include #include template struct std::coroutine_traits { struct promise_type { void get_return_object() noexcept {} std::suspend_never initial_suspend() const noexcept { return {}; } std::suspend_never final_suspend() const noexcept { return {}; } void return_void() noexcept {} void unhandled_exception() noexcept { try { std::rethrow_exception(std::current_exception()); } catch (std::exception& ex) { std::cout << "Unhandled exception (in void coroutine) detected: " << ex.what() << std::endl; } } }; }; #endif //AUTOCAT_GNOME_CORO_H