| 1 |
// { dg-additional-options "-fpreprocessed -w" } |
| 2 |
|
| 3 |
namespace std { |
| 4 |
template <typename a> a b(a &&); |
| 5 |
template <typename c> struct d { c e; }; |
| 6 |
template <typename f, typename> struct coroutine_traits : f {}; |
| 7 |
template <typename = void> struct coroutine_handle; |
| 8 |
template <> struct coroutine_handle<> { |
| 9 |
static coroutine_handle from_address(void*); |
| 10 |
void* address(); |
| 11 |
}; |
| 12 |
template <typename> struct coroutine_handle : coroutine_handle<> { |
| 13 |
static coroutine_handle from_address(void*); |
| 14 |
void* address(); |
| 15 |
}; |
| 16 |
struct g {}; |
| 17 |
} // namespace std |
| 18 |
|
| 19 |
class h {}; |
| 20 |
class i { |
| 21 |
i(i &&); |
| 22 |
}; |
| 23 |
|
| 24 |
namespace ac { |
| 25 |
template <typename> class ad { |
| 26 |
public: |
| 27 |
bool await_ready() noexcept; |
| 28 |
void await_resume() noexcept; |
| 29 |
void await_suspend(std::coroutine_handle<>) noexcept; |
| 30 |
i ae; |
| 31 |
}; |
| 32 |
} // namespace ac |
| 33 |
|
| 34 |
template <typename ab> ac::ad<ab> operator co_await(ab) noexcept; |
| 35 |
class j { |
| 36 |
class l {}; |
| 37 |
|
| 38 |
public: |
| 39 |
std::g initial_suspend(); |
| 40 |
l final_suspend() noexcept; |
| 41 |
}; |
| 42 |
class n; |
| 43 |
class m : public j { |
| 44 |
public: |
| 45 |
n get_return_object(); |
| 46 |
void unhandled_exception(); |
| 47 |
}; |
| 48 |
class n { |
| 49 |
public: |
| 50 |
using promise_type = m; |
| 51 |
}; |
| 52 |
std::d<h> k; |
| 53 |
void a() { |
| 54 |
auto am = k; |
| 55 |
[&]() -> n { co_await std::b(am.e); }; |
| 56 |
} |