According to this page: http://womble.decadent.org.uk/c++/template-faq.html#non-dependent "Non-dependent names are those names that are considered not to depend upon the template parameters, plus the name of the template itself and names declared within it (members, friends and local variables)"
This appears to be backed up by the fact that the following code is considered valid (by LLVM/Comeau)
template<typename T>
struct Template
{
typedef int I;
typedef Template::I Type; // 'Template' is NOT dependent
typedef Template<T>::I Type2; // 'Template<T>' is NOT dependent
Template<T>* m;
void f()
{
m->f(); // 'm' is NOT dependent
}
};
After spending some time reading the C++ 98 standard, I cannot find where this behaviour is specified. I would expect to find a mention of this under 'temp.nondep'.