Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/coroutines/pr93458-3-missing-handle.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
rev | line source |
---|---|
145 | 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 } |