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

The term "class name declaration" used in [basic.def]/2 (2.5) is not defined in the Standard #1641

Closed
jabelloc opened this issue Jun 9, 2017 · 0 comments
Assignees

Comments

@jabelloc
Copy link

jabelloc commented Jun 9, 2017

The term "class name declaration" used in [basic.def]/2 (2.5) is not defined in the Standard. As a matter of fact, it is not even mentioned a second time in the spec. The term is informally introduced in the second example of [class.name]/2 as follows:

struct s { int a; };
void g() {
    struct s; // hide global struct s with a block-scope declaration
    s* p; // refer to local struct s
    struct s { char* p; }; // define local struct s
    struct s; // redeclaration, has no effect
}

where the two declarations struct s; above, as far as I can tell, are what the Standard refers to in [basic.def]/2 (2.5) as a "class name declaration". But these declarations are already defined in the Standard as an elaborated-type-specifier , or more specifically, as an elaborated-type-specifier that is the sole constituent of its declaration, as can be seen in the first form shown in paragraph [dcl.type.elab]/1.

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

2 participants