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
/
cpp1y
/
lambda-init6.C
blob
d6c1587487d44fd8a1a4ea19cb703b2df488ea90
1
// Test that captures are not named in the closure type.
2
// { dg-do compile { target c++14 } }
3
4
int main()
5
{
6
int i;
7
auto lam = [i,j=42]{};
8
lam.j; // { dg-error "no member" }
9
lam.i; // { dg-error "no member" }
10
}