If it declares a class member,
the terminal name of the
declarator-id is not looked up;
otherwise, only those lookup results that are nominable in
S
are considered when identifying
any function template specialization being declared (
[temp.deduct.decl])
.