Skip to content

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

Open
@xmh0511

Description

@xmh0511
Contributor

[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.

Activity

changed the title [-][basic.scope.temp] p2 What does "that scope" mean?[/-] [+][basic.scope.temp] p2 What is "the scope D inhabits"?[/+] on Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xmh0511

        Issue actions

          [basic.scope.temp] p2 What is "the scope D inhabits"? · Issue #4931 · cplusplus/draft