blob: 766f740fcbde4c625a6253ff24fcb99b4cb09cc9 [file] [log] [blame]
// { dg-additional-options "-fsyntax-only -fexceptions -w" }
// Diagose missing coroutine handle class template.
namespace std {
// coroutine traits
template<typename _R, typename...> struct coroutine_traits {
using promise_type = typename _R::promise_type;
};
}
int
bad_coroutine (void)
{
co_yield 5; // { dg-error {coroutines require a handle class template; cannot find 'std::coroutine_handle'} }
co_return;
}