aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
blob: 4ddd38cc4eee68edf60b1101241d2a364966c435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/42399
// { dg-do compile { target c++11 } }

struct A {
  A();
  A(const A&) = delete;		// { dg-message "declared" }
};

template <class T>
void f()
{
  T t;
  [t] { return 0; };		// { dg-error "use" }
}

int main()
{
  f<A>();			// { dg-message "required" }
}