Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/pr98118.C

raw
1 namespace std {
2 inline namespace __n4861 {
3 template <typename _Result, typename> struct coroutine_traits : _Result {};
4 template <typename = void> struct coroutine_handle;
5 template <> struct coroutine_handle<> {
6 static coroutine_handle from_address(void*);
7 void* address();
8 };
9 template <typename> struct coroutine_handle : coroutine_handle<> {
10 static coroutine_handle from_address(void*);
11 void* address();
12 };
13 struct suspend_never {
14 bool await_ready() noexcept;
15 void await_suspend(coroutine_handle<>) noexcept;
16 void await_resume() noexcept;
17 };
18 } // namespace __n4861
19 } // namespace std
20
21 struct fire_and_forget {
22 struct promise_type {
23 fire_and_forget get_return_object();
24 std::suspend_never initial_suspend();
25 std::suspend_never final_suspend() noexcept;
26 void return_void();
27 void unhandled_exception();
28 };
29 };
30
31 struct bug {
32 ~bug();
33 };
34
35 fire_and_forget f(bug) { co_return; }