I was trying to compile some file which included boost GIL, I get that error only with g++ 4.6 with --std=c++0x
It works with g++ 4.6 without C++0x and g++ 4.5 with or without C++0x enabled
The following reproduces the error:
1 2 3 4 5 6 7 8
template <typename T>
struct S {
static T * P;
T x;
};
template <typename T>
T * S<T>::P = &S<T>::x;