I have the same warning message as in a previous discussion but I don't understand how to solve it:
warning: too many template headers for foo<1>::value (should be 0) int const foo<1>::value = 1;
The warning message appears when one wants to use the following toy header:
#ifndef FOO
#define FOO
template<int T>
struct foo;
template<>
struct foo<1>
{ static int const value; };
template<>
int const foo<1>::value = 1;
#endif
Can you explain me what the problem is here?