namelookup bug in gcc?

2008-04-22 Thread Balazs Dezso
Hello all, I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4. #include struct B { static const int x = 1; }; struct A { static const int x = 0; template static void f() { std::cerr << A::x << std::endl; } }; int main() { A::f(); return 0; } The gcc result: 0 W

template parameter does not hide class name

2008-04-15 Thread Balazs Dezso
Hello all, I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4. #include struct B { static const int x = 1; }; struct A { static const int x = 0; template static void f() { std::cerr << A::x << std::endl; } }; int main() { A::f(); return 0; } The program just wr