Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
noexcept-type6.C
blob: 67e0bf8cf8c37874b59ad7bd2f8ef5169e710714 [
file
] [
log
] [
blame
]
// Test for lambda conversion.
// { dg-do compile { target c++17 } }
void
f
()
{
auto
l
=
[]()
noexcept
{
return
0
;
};
int
(*
p
)()
noexcept
=
l
;
int
(*
q
)()
=
l
;
auto
l2
=
[]{
return
0
;
};
p
=
l2
;
// { dg-error "" }
q
=
l2
;
}