The point of declaration for a function-local predefined
variable ([dcl.fct.def.general]) is immediately before the
function-body of a function definition.
The point of declaration for a template parameter is immediately after its complete
template-parameter.
[Example 4: typedefunsignedchar T;
template<class T
= T // lookup finds the typedef name of unsigned char
, T // lookup finds the template parameter
N =0>struct A {};
— end example]
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.