In C++, the concept of dependent names is important because:
Such names are unbound and are looked up at the point of the template instantiation ... in both the context of the template definition and the context of the point of instantiation
However, the only thing that the standard says is a dependent name is given in [temp.dep]/2, referring to unqualified function calls, basically in order to enable ADL to be fully effective for those function calls.
Are there any other dependent names besides those?
Consider some code like this, for example:
template <class T>
void foo(T t) {
t.bar();
};
If one were to refer to bar as a "dependent name", would that be a technically incorrect use of the term, according to the standard?
Thanks to Declarations and where to find them being accepted into C++23, there is now an explicit enumeration of categories of dependent names, which seems to cover the code in the question.
In N4919 [temp.dep.general]/2 it is stated that
And in [temp.dep.type]/5 the rules for when qualified names are dependent are given:
Regarding the example of
t.bar()given in the question, the namebaris described in the referenced section (6.5.5) ([basic.lookup.qual]) as a "member-qualified-name". Furthermore, [basic.lookup.qual]/2 explains that its "lookup context" is "the type of its associated object expression (considered dependent if the object expression is type-dependent)". Clearlytis type-dependent, and it is the lookup context forbar, so [temp.dep.type]/5.2 applies, andbaris indeed a dependent qualified name.