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

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();
}