aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C
blob: dcea1690dded1bc7de2ccd075d39ca94ed128fb6 (plain)
1
2
3
4
5
6
7
8
9
// 5.1.2/2: A lambda-expression shall not appear in an unevaluated operand.
// { dg-do compile { target c++11 } }

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

// { dg-prune-output "template argument" }
// { dg-prune-output "invalid type" }