Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C

raw
1 // 5.1.2/2: A lambda-expression shall not appear in an unevaluated operand.
2 // { dg-do compile { target c++11 } }
3
4 template <class T>
5 struct A { };
6 A<decltype([]{ return 1; }())> a; // { dg-error "lambda.*unevaluated context" "" { target c++17_down } }
7
8 // { dg-prune-output "template argument" }
9 // { dg-prune-output "invalid type" }