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
/
vla8.C
blob
68cafe585e97da75f54d21030847405295327893
1
// PR c++/55149
2
// { dg-do compile { target c++11 } }
3
// { dg-options "-Wno-vla" }
4
5
template<unsigned int TA>
6
struct SA
7
{
8
SA (const int & PA);
9
int nt;
10
};
11
12
template<typename TB>
13
inline void
14
test(TB aa)
15
{
16
;
17
}
18
19
template<unsigned int TA>
20
inline
21
SA<TA>::SA(const int & PA)
22
{
23
float e[nt];
24
test([&e](int i, int j){ return e[i] < e[j]; });
25
}
26
27
int main()
28
{
29
int d;
30
SA<2> iso(d);
31
return 0;
32
}