A declaration that uses a declarative nested-name-specifier
shall be a friend declaration or
inhabit a scope that contains the entity being redeclared or specialized.
If a nested-name-specifierN
is declarative and
has a simple-template-id with a template argument list A
that involves a template parameter,
let T be the template nominated by N without A.
Otherwise, N nominates the partial specialization ([temp.spec.partial]) of T
whose template argument list is equivalent to A ([temp.over.link]);
the program is ill-formed if no such partial specialization exists.
The type of the expression is the type of the result.
The result is an lvalue if the member is
a function,
a variable,
a structured binding ([dcl.struct.bind]),
a static member function, or
a data member,
and a prvalue otherwise.