```
#include<math.h>
#include<iostream>

using namespace std;

template <int x, int N> struct f{
        static const int res = x*(f<x, N-1>::res);
};

template <int x> struct f<x, 0>{
        static const int res = 1;
};

int main(){
        for(int i=0;i<1000000;++i)
                int a = (f<3, 100>::res);
}

```

If I change f<3, 100> to f<3, 10> code runs fine. But for 100 it gives following error:

```
.
.
.    
k.cpp:7:26:   recursively required from ‘const int f<3, 99>::res’
    k.cpp:7:26:   required from ‘const int f<3, 100>::res’
    k.cpp:16:23:   required from here
    k.cpp:7:19: error: initializer invalid for static member with constructor
    k.cpp:7:19: error: ‘f<3, 98>::res’ cannot be initialized by a non-constant expression when being declared
    k.cpp: In instantiation of ‘const int f<3, 99>::res’:
    k.cpp:7:26:   required from ‘const int f<3, 100>::res’
    k.cpp:16:23:   required from here
    k.cpp:7:19: error: initializer invalid for static member with constructor
    k.cpp:7:19: error: ‘f<3, 99>::res’ cannot be initialized by a non-constant expression when being declared
    k.cpp: In instantiation of ‘const int f<3, 100>::res’:
    k.cpp:16:23:   required from here
    k.cpp:7:19: error: initializer invalid for static member with constructor
    k.cpp:7:19: error: ‘f<3, 100>::res’ cannot be initialized by a non-constant expression when being declared

```

I am new to meta-programming. Though error looks like something related to `const` but it is not. Can someone please help me understand?