1 //  { dg-options "-fcoroutines -std=c++14" }
2 #define DELETE_COPY_CTOR 1
3 #include "ramp-return.h"
4 
5 task<int>
foo()6 foo ()
7 {
8  std::coroutine_handle<promise<int>> _handle;
9  return task<int> (_handle);  // { dg-error {use of deleted function 'task<T>::task\(const task<T>&\) \[with T = int\]'} }
10 }
11 
12 task<int>
bar()13 bar ()
14 {
15   co_return 0;
16 } // { dg-error {use of deleted function 'task<T>::task\(const task<T>&\) \[with T = int\]'} }
17 
18 task<std::vector<int>>
baz()19 baz ()
20 {
21   co_return std::vector<int>();
22 } // { dg-error {use of deleted function 'task<T>::task\(const task<T>&\) \[with T = std::vector<int>\]'} }
23