view gcc/testsuite/g++.dg/coroutines/coro-missing-initial-suspend.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 2b5abeee2509
children
line wrap: on
line source

//  { dg-additional-options "-fsyntax-only -w" }
#include "coro.h"

// Check diagnostic return from missing promise initial suspend entry.

#define MISSING_INITIAL_SUSPEND
#include "coro1-ret-int-yield-int.h"

coro1
my_coro () // { dg-error {no member named 'initial_suspend' in} }
{
  co_return 0;
}

// check we have not messed up continuation of the compilation.
template <class... Args>
struct void_t_imp {
  using type = void;
};