summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
blob: dab53f1276ef67c71e9dfc5dcb6d9f95faec9534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/42399
// { dg-options "-std=c++0x" }

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

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

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