Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[basic.scope.temp] p2 What is "the scope D inhabits"? #4931

Open
xmh0511 opened this issue Sep 24, 2021 · 0 comments
Open

[basic.scope.temp] p2 What is "the scope D inhabits"? #4931

xmh0511 opened this issue Sep 24, 2021 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Sep 24, 2021

[basic.scope.temp] p2

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.

According to [basic.scope#scope-2]

A declaration inhabits the immediate scope at its locus ([basic.scope.pdecl]).

However, we didn't specify the locus of a template-declaration. The note [basic.scope#scope-2.8] also depends on the scope template-declaration inhabits

The declaration in a template-declaration inhabits the same scope as the template-declaration.

@xmh0511 xmh0511 changed the title [basic.scope.temp] p2 What does "that scope" mean? [basic.scope.temp] p2 What is "the scope D inhabits"? Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant