OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Addition of a whole slew of "eb" test cases generated from the egcs-bugs
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.robertl
/
eb11.C
1
// Build don't link:
2
3
#define NO_META_MAX
4
#ifndef NO_META_MAX
5
template<int N1, int N2>
6
struct meta_max {
7
enum { max = (N1 > N2) ? N1 : N2 };
8
};
9
#endif
10
11
struct X {
12
enum {
13
a = 0,
14
n = 0
15
};
16
};
17
18
template<class T1, class T2>
19
struct Y {
20
21
enum {
22
a = T1::a + T2::a,
23
24
// NB: if the next line is changed to
25
// n = (T1::n > T2::n) ? T1::n : T2::n
26
// the problem goes away.
27
28
n = meta_max<T1::n,T2::n>::max
29
};
30
};
31
32
int z = Y<X,X>::a;