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

[class.mem] Explicit specializations within classes #3653

Merged
merged 1 commit into from Mar 4, 2020

Conversation

sdkrystian
Copy link
Contributor

@sdkrystian sdkrystian commented Jan 29, 2020

The intent of CWG 727 was to allow explicit specializations to be declared in any scope that the primary template can be declared in, particularly class scope. Quote [temp.expl.spec] p3:

An explicit specialization may be declared in any scope in which the corresponding primary template may be defined.

While this wording was changed, it seems like the grammar for member-declaration was neglected, meaning that declaring an explicit specialization in class scope is not syntactically valid.

(note that explicit-specialization isn't a form of template-declaration, as the template-parameter-list of template-head cannot be empty)

@timsong-cpp
Copy link
Contributor

How is this editorial?

@sdkrystian
Copy link
Contributor Author

The intent is known. Quote the wiki:

Problems with the presentation of the specification, which, when fixed, would not alter the (intended) meaning of the specification. 

@zygoloid zygoloid merged commit f764791 into cplusplus:master Mar 4, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants