repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-ctors.C
blob
8dfb2fa6b6c5fc9c29d99398212f789aa7b361b0
1
// { dg-do run { target c++11 } }
2
3
struct A
4
{
5
A() { }
6
A(A&) { }
7
A(A&&) { }
8
};
9
10
int main()
11
{
12
A a;
13
auto lam4 = [a]{}; // OK, implicit move ctor
14
lam4();
15
auto lam5 = lam4; // OK, implicit copy ctor
16
lam5();
17
}