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
testsuite: arm: Relax register selection [PR116623]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
pr66735.C
blob
2d81fb880ef2760cf1fc8ec2fe8bc9f202e6481f
1
// { dg-do compile { target c++14 } }
2
3
// PR c++/66735, lost constness on reference capture
4
5
template <typename T> void Foo ()
6
{
7
T const x = 5;
8
9
auto l = [&rx = x]() {};
10
11
l ();
12
}
13
14
void Baz ()
15
{
16
int const x = 5;
17
auto l = [&rx = x]() {};
18
19
20
l ();
21
Foo<int> ();
22
}