Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/lambda-generic-const9.C

raw
1 // PR c++/86429
2 // { dg-do compile { target c++14 } }
3
4 struct A
5 {
6 int i;
7 constexpr int f(const int&) const { return i; }
8 };
9
10 void g()
11 {
12 constexpr A a = { 42 };
13 [&](auto x) {
14 constexpr auto y = a.f(x);
15 }(24);
16 }