aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/lambda-this4.C
blob: 5d96879149158708c49fc2e4ebb4681465781458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/94205
// { dg-do compile { target c++17 } }

struct S
{
  int i;
  int a = [this] { this->i = 5; return 6; } ();
};


constexpr S s = {};

static_assert (s.i == 5 && s.a == 6);