Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/lambda-this5.C

raw
1 // PR c++/94205
2 // { dg-do compile { target c++17 } }
3
4 struct S
5 {
6 int a = [this] { this->a = 5; return 6; } ();
7 };
8
9 constexpr S s = {};
10
11 static_assert(s.a == 6);