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
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.robertl
/
eb20.C
blob
08c76d0f97e3ba2eceffd0c4734329fedd865d78
1
// Error: ICE on 2.7.2.3 and EGCS 1.0.0.
2
// Build don't link:
3
4
template<int N1, int N2>
5
struct meta_max {
6
enum { max = (N1 > N2) ? N1 : N2 };
7
};
8
9
struct X {
10
enum {
11
a = 0,
12
n = 0
13
};
14
};
15
16
template<class T1, class T2, class T3>
17
struct Y {
18
19
enum {
20
a = T1::a + T2::a + T3::a,
21
n = meta_max<meta_max<T1::n,T2::n>::max, T3::n>::max
22
};
23
};
24
25
template<class T>
26
struct Z {
27
enum {
28
a = T::a,
29
n = T::n
30
};
31
};
32
33
Z<Y<X,X,X> > z;