Files
2025-10-25 03:02:53 +03:00

2.0 KiB

[basic.scope.temp]

6 Basics [basic]

6.4 Scope [basic.scope]

6.4.9 Template parameter scope [basic.scope.temp]

1

#

Eachtype-tt-parameter,variable-tt-parameter, andconcept-tt-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]