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

struct A
{
  A() { }
  A(A&) { }
  A(A&&) { }
};

int main()
{
  A a;
  auto lam4 = [a]{};		// OK, implicit move ctor
  lam4();
  auto lam5 = lam4;		// OK, implicit copy ctor
  lam5();
}