1 // RUN: %clang_cc1 -fsyntax-only %s
8 enum { value
= FibonacciEval
<I
-1>::value
+ FibonacciEval
<I
-2>::value
};
12 struct FibonacciEval
{
13 enum { value
= Fibonacci
<I
>::value
};
16 template<> struct Fibonacci
<0> {
20 template<> struct Fibonacci
<1> {
24 int array5
[Fibonacci
<5>::value
== 5? 1 : -1];
25 int array10
[Fibonacci
<10>::value
== 55? 1 : -1];
28 struct FibonacciEval2
;
32 static const unsigned value
33 = FibonacciEval2
<I
-1>::value
+ FibonacciEval2
<I
-2>::value
;
37 struct FibonacciEval2
{
38 static const unsigned value
= Fibonacci2
<I
>::value
;
41 template<> struct Fibonacci2
<0> {
42 static const unsigned value
= 0;
45 template<> struct Fibonacci2
<1> {
46 static const unsigned value
= 1;
49 int array5_2
[Fibonacci2
<5>::value
== 5? 1 : -1];
50 int array10_2
[Fibonacci2
<10>::value
== 55? 1 : -1];
54 static const unsigned value
= Fibonacci3
<I
-1>::value
+ Fibonacci3
<I
-2>::value
;
57 template<> struct Fibonacci3
<0> {
58 static const unsigned value
= 0;
61 template<> struct Fibonacci3
<1> {
62 static const unsigned value
= 1;
65 int array5_3
[Fibonacci3
<5>::value
== 5? 1 : -1];
66 int array10_3
[Fibonacci3
<10>::value
== 55? 1 : -1];