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.