gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C
raw| 1 | // { dg-additional-options "-fsyntax-only -w" } |
| 2 | |
| 3 | // check error for a bad overload of operator new. |
| 4 | |
| 5 | #define BOGUS_OPNEW_CASE1 |
| 6 | #include "coro1-allocators.h" |
| 7 | |
| 8 | struct coro1 |
| 9 | f () /* { dg-error {'operator new' is provided by 'std::__n4861::__coroutine_traits_impl<coro1, void>::promise_type' \{aka 'coro1::promise_type'\} but is not usable with the function signature 'coro1 f\(\)'} } */ |
| 10 | { |
| 11 | co_return; |
| 12 | } |