1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
3 #include "Inputs/std-coroutine.h"
5 namespace std::experimental
{
6 // expected-note@+1{{declared here}}
7 template <typename T
> using coroutine_traits
= std::coroutine_traits
<T
>;
8 using std::coroutine_handle
;
9 } // namespace std::experimental
12 bool await_ready() noexcept
;
13 void await_suspend(std::experimental::coroutine_handle
<> coro
) noexcept
;
14 void await_resume() noexcept
;
18 void get_return_object();
19 my_awaitable
initial_suspend();
20 my_awaitable
final_suspend() noexcept
;
22 void unhandled_exception();
26 struct std::coroutine_traits
<void> { using promise_type
= promise_void
; };
29 co_return
; // expected-error {{mixed use of std and std::experimental namespaces for coroutine components}}
30 // expected-warning@-1{{support for 'std::experimental::coroutine_traits' will be removed}}
31 // expected-note@Inputs/std-coroutine.h:18 {{'coroutine_traits' declared here}}