blob: 4687ed245ac84bc898196ece1841d4f35d4f0f0c [file] [log] [blame]
Brian Gesiak32ee7122018-07-11 00:45:48 +00001// This file contains references to sections of the Coroutines TS, which can be
2// found at http://wg21.link/coroutines.
3
4// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -verify %s -fcxx-exceptions -fexceptions -Wunused-result
5
6namespace std {
7namespace experimental {
8
9template<typename ...T>
10struct coroutine_traits {
11 struct promise_type {};
12};
13
14template<> struct coroutine_traits<void>; // expected-note {{forward declaration of 'std::experimental::coroutine_traits<void>'}}
15}} // namespace std::experimental
16
17void uses_forward_declaration() {
18 co_return; // expected-error {{this function cannot be a coroutine: missing definition of specialization 'coroutine_traits<void>'}}
19}