Dependent names are not clearly defined in the C++ standard, so it leaves a lot to be desired in terms of determining what a dependent name is, which leads me to this question: Are unqualified names of non-static data members with dependent types dependent? For example:
template<typename T>
struct S { T t; };
Is the name t here a dependent name? The type certainly is dependent, but it's not clear if the name is, since it can always be resolved to refer to a member.
No,
tis not dependent. While there is an open issue about expanding the definition of a dependent name, the idea of a name being dependent is that lookup for it is deferred. (Even without ADL, consider the lookup forT::foo, which might be a function, a function template, or a data member (withouttemplateortypename).) That’s not the case here;t(in a context insideS) is immediately resolved to the class member.