Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
constexpr-lambda3.C
blob: ccdf697708240890ccdd4f299beac72d7d4e7674 [
file
] [
log
] [
blame
]
// { dg-do compile { target c++17 } }
constexpr
auto
add
=
[]
(
int
n
,
int
m
)
{
auto
L
=
[=]
{
return
n
;
};
auto
R
=
[=]
{
return
m
;
};
return
[=]
{
return
L
()
+
R
();
};
};
static_assert
(
add
(
3
,
4
)()
==
7
,
""
);