Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-lambda7.C

raw
1 // PR c++/95020
2 // { dg-do compile { target c++2a } }
3
4 template<typename>
5 void foo() {
6 auto t = [](auto v) {
7 static_assert(requires { *v; }); // { dg-error "static assertion failed" }
8 };
9 t(0);
10 }
11
12 void bar() {
13 foo<void>();
14 }