Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/coro-missing-initial-suspend.C

raw
1 // { dg-additional-options "-fsyntax-only -w" }
2 #include "coro.h"
3
4 // Check diagnostic return from missing promise initial suspend entry.
5
6 #define MISSING_INITIAL_SUSPEND
7 #include "coro1-ret-int-yield-int.h"
8
9 coro1
10 my_coro () // { dg-error {no member named 'initial_suspend' in} }
11 {
12 co_return 0;
13 }
14
15 // check we have not messed up continuation of the compilation.
16 template <class... Args>
17 struct void_t_imp {
18 using type = void;
19 };