Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
lambda-this4.C
blob: 5d96879149158708c49fc2e4ebb4681465781458 [
file
] [
log
] [
blame
]
// 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
);