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
Update concepts branch to revision 131834
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
crash2.C
blob
47c95ab067fd90f1b0b8f33a106a450c061b32a1
1
// { dg-options "" }
2
3
template <class EnumType>
4
class A
5
{
6
public:
7
static const EnumType size = max; // { dg-error "" }
8
int table[size]; // { dg-error "constant" }
9
};
10
template <class EnumType>
11
const EnumType A<EnumType>::size;
12
13
14
namespace N
15
{
16
enum E { max = 5 };
17
18
struct B
19
{
20
A<E> a;
21
};
22
23
}
24
25
int
26
main()
27
{
28
N::B b;
29
30
return 0;
31
}