Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/pr93458-3-missing-handle.C

raw
1 // { dg-additional-options "-fsyntax-only -fexceptions -w" }
2
3 // Diagose missing coroutine handle class template.
4
5 namespace std {
6 // coroutine traits
7 template<typename _R, typename...> struct coroutine_traits {
8 using promise_type = typename _R::promise_type;
9 };
10 }
11
12 int
13 bad_coroutine (void)
14 {
15 co_yield 5; // { dg-error {coroutines require a handle class template; cannot find 'std::coroutine_handle'} }
16 co_return;
17 }