summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C
blob: 33ba7b0a4366c6965eae46a946083fcfc00d5e7d (plain)
1
2
3
4
5
6
7
// 5.1.2/2: A lambda-expression shall not appear in an unevaluated operand.
// { dg-options "-std=c++0x" }

template <class T>
struct A { };
A<decltype([]{ return 1; }())> a; // { dg-error "lambda.*unevaluated context" }