Why are static members of template classes not unique
问题 Take a look at the following code: #include <iostream> template <typename T> class Foo { public: static T bar; }; template <typename T> typename T Foo<T>::bar; int main() { std::cout << "Foo<int>::bar : " << &Foo<int>::bar << std::endl; std::cout << "Foo<double>::bar : " << &Foo<double>::bar << std::endl; return 0; } This will print out 2 different addresses. I can understand why in this case, bar is of type T and thus instantiations of different T's in Foo<T> will get you different static