Some compilers do not perform name binding properly, effectively delaying all of it to the template instantiation point. This is not a conforming behavior, and it can let errors like this pass unnoticed.
I had reported this issue as well and afaik Visual Studio 2010 does not handle non dependent name look-up in dependent base class correctly: template <typename T> struct Base { typedef T Type; int m_n; }; template <typename T> struct DerivedT : public Base<T> { void Foo() { //illegal code accepted by VS2010? #if 1 Type t; m_n = 0; #else typename Base<T>::Type t; //make name dependent this->m_n = 0; #endif } }; Somehow with the old Boost (1.52) iterator_facade using the reference type directly in derived class was accepted by Visual Studio 2010 while the new code is (correctly) rejected. Anyway i am not a template magician, so may be this gives a clue.