(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
coroutines/
coro-missing-ueh.h
       1  #ifndef __MissingUEH_H
       2  #define __MissingUEH_H
       3  
       4  /* Common code for testing missing unhandled_exception.  */
       5  struct MissingUEH {
       6    coro::coroutine_handle<> handle;
       7    MissingUEH () : handle (nullptr) {}
       8    MissingUEH (coro::coroutine_handle<> handle) : handle (handle) {}
       9    struct missing_ueh {
      10      coro::suspend_never initial_suspend() { return {}; }
      11      coro::suspend_never final_suspend() noexcept { return {}; }
      12      MissingUEH get_return_object() {
      13        return MissingUEH (coro::coroutine_handle<missing_ueh>::from_promise (*this));
      14      }
      15      void return_void () {}
      16    };
      17  };
      18  
      19  template<> struct coro::coroutine_traits<MissingUEH> {
      20      using promise_type = MissingUEH::missing_ueh;
      21  };
      22  
      23  #endif