Debian Codegraph @

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

raw
1
2 #include <coroutine>
3 #include <new>
4
5 struct test
6 {
7 test () {}
8 test (int) {}
9
10 struct promise_type {
11 test get_return_object () { return {}; }
12 // vvv
13 static int get_return_object_on_allocation_failure () { return {}; }
14 std::suspend_never initial_suspend () noexcept { return {}; }
15 std::suspend_never final_suspend () noexcept { return {}; }
16 void return_void () {}
17 void unhandled_exception () {}
18 };
19 };
20
21 test
22 f () { co_return; }
23
24 int
25 main ()
26 {
27 f ();
28 }