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