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
/cp
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-ice25.C
blob
1a33fb1636447b83644950b29bff93cf1ce9aa73
1
// PR c++/83204
2
// { dg-do compile { target c++11 } }
3
4
int rand();
5
6
template<typename T>
7
struct s
8
{
9
int count() { return rand(); }
10
};
11
12
template<typename v>
13
void f(s<v> a)
14
{
15
int const x = a.count();
16
int r = 0;
17
auto l = [&](int& r)
18
{
19
for(int y = 0, yend = (x); y < yend; ++y)
20
{
21
r += y;
22
}
23
};
24
l(r);
25
}
26
27
template void f(s<float>);