6
Basics
[basic]
6.4
Scope
[basic.scope]
6.4.9
Template parameter scope
[basic.scope.temp]
1
#
Each template
template-parameter
introduces a
template parameter scope
that includes the
template-head
of the
template-parameter
.
2
#
Each
template-declaration
D
introduces a template parameter scope that extends from the beginning of its
template-parameter-list
to the end of the
template-declaration
.
Any declaration outside the
template-parameter-list
that would inhabit that scope instead inhabits the same scope as
D
.
The parent scope of any scope
S
that is not a template parameter scope is the smallest scope that contains
S
and is not a template parameter scope
.
[
Note
1
:
Therefore, only template parameters belong to a template parameter scope, and only template parameter scopes have a template parameter scope as a parent scope
.
—
end note
]