blob: 8a79c3570345314d888b71508efa52a02d4db37b [file] [log] [blame]
// This file contains references to sections of the Coroutines TS, which can be
// found at http://wg21.link/coroutines.
// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -verify %s -fcxx-exceptions -fexceptions -Wunused-result
namespace std {
namespace experimental {
template <typename... T>
struct coroutine_traits {
struct promise_type {};
};
template <> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::experimental::coroutine_traits<void>'}}
} // namespace experimental
} // namespace std
void uses_forward_declaration() {
co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'coroutine_traits<void>'}}
// expected-warning@-1 {{Please move from std::experimental::coroutine_traits to std::coroutine_traits}}
}