The point of declaration for a function-local predefined
variable ([dcl.fct.def.general]) is immediately before the
function-body of a function definition.
typedefunsignedchar T;
template<class T
= T // lookup finds the typedef name of unsigned char
, T // lookup finds the template parameter
N =0>struct A {};
Friend declarations refer to functions or classes that are
members of the nearest enclosing namespace, but they do not introduce
new names into that namespace ([namespace.memdef]).
Function
declarations at block scope and variable declarations with the
extern specifier at block scope refer to declarations that are
members of an enclosing namespace, but they do not introduce new names
into that scope.