19 lines · cpp
1// This file contains references to sections of the Coroutines TS, which can be2// found at http://wg21.link/coroutines.3 4// RUN: %clang_cc1 -std=c++20 -verify %s -fcxx-exceptions -fexceptions -Wunused-result5 6namespace std {7 8template<typename ...T>9struct coroutine_traits {10 struct promise_type {};11};12 13template <> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::coroutine_traits<void>'}}14} // namespace std15 16void uses_forward_declaration() {17 co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'std::coroutine_traits<void>'}}18}19