| 1 |
// PR c++/90842 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
auto a = [](auto x) struct C { void foo (); } {}; // { dg-error "expected" } |
| 5 |
// { dg-error "type-specifier invalid in lambda" "" { target *-*-* } .-1 } |
| 6 |
auto b = [](auto x) mutable typedef {}; // { dg-error "'typedef' invalid in lambda" } |
| 7 |
#if __cpp_concepts >= 201907L |
| 8 |
auto c = [](auto x) constexpr concept {}; // { dg-error "'concept' invalid in lambda" "" { target c++2a } } |
| 9 |
#endif |
| 10 |
auto d = [](auto x) mutable friend {}; // { dg-error "'friend' invalid in lambda" } |