view gcc/testsuite/g++.dg/cpp2a/concepts-lambda7.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

// PR c++/95020
// { dg-do compile { target c++2a } }

template<typename>
void foo() {
  auto t = [](auto v) {
    static_assert(requires { *v; }); // { dg-error "static assertion failed" }
  };
  t(0);
}

void bar() {
  foo<void>();
}