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

[temp.friend]/2: Last sentence redundant? #2939

Open
tjs137 opened this issue Jun 22, 2019 · 1 comment
Open

[temp.friend]/2: Last sentence redundant? #2939

tjs137 opened this issue Jun 22, 2019 · 1 comment

Comments

@tjs137
Copy link

tjs137 commented Jun 22, 2019

[temp.friend]/2

A friend template may be declared within a class or class template. A friend function template may be defined within a class or class template, but a friend class template may not be defined in a class or class template. In these cases, all specializations of the friend class or friend function template are friends of the class or class template granting friendship.

[temp.friend]/3

A template friend declaration specifies that all specializations of that template, whether they are implicitly instantiated, partially specialized or explicitly specialized, are friends of the class
containing the template friend declaration.

Are these not semantically equivalent?

Also, are "friend template" and "template friend" interchangeable? If so, perhaps only one should be used for the sake of clarity.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 24, 2019
@jensmaurer
Copy link
Member

jensmaurer commented Jul 16, 2019

Editorial meeting: "friend template" is when the friend declaration befriends a template. "template friend" is the more general case.
"A class or class template may befriend a class template or function template. Such a friend declaration is termed a friend template." replace first sentence of p2. Merge p3 into p2 ("that template").
p4 say "may alternatively" In p6, we mean a template friend declaration.
p2 intro sentence: "A template friend declaration may be declared within a .... A template friend declaration that befriends a class or function template is termed a friend template declaration."
p1 rephrase to specify meaning based on the grammar in all cases.
Run the change past CWG.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Jul 16, 2019
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