Hello all, I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4.
#include <iostream> struct B { static const int x = 1; }; struct A { static const int x = 0; template <typename A> static void f() { std::cerr << A::x << std::endl; } }; int main() { A::f<B>(); return 0; } The program just write zero to the standard error, which means that the template parameter does not hide the class name. I have tested other compilers, and they write one to the standard error. I do not know surely, but I mean this a bug in gcc or a very strange behaviour of c++ standard. Best, Balazs