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.copy.assign]p8 needs rewording #4388

Closed
tkoeppe opened this issue Nov 24, 2020 · 3 comments · Fixed by #4418
Closed

[class.copy.assign]p8 needs rewording #4388

tkoeppe opened this issue Nov 24, 2020 · 3 comments · Fixed by #4418
Assignees

Comments

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 24, 2020

From a could/might review, a suggestion by @zygoloid regarding [class.copy.assign]p8:


assignment operator with a parameter type that could/can be that of a

I don't like the old or new words here. I think we should rephrase this whole sentence.

I also wonder if this is actually a normative rule at all, or if this is a consequence of the rule in [class.copy.assign] talking about "explicitly declar[ing] a copy assignment operator". If it's a consequence, then it should be a note, and if not, then it shouldn't be phrased as "this happens because the declaration is not considered an explicit declaration of the operator" but instead as something like:

A using-declaration that brings in an assignment operator from a base class never suppresses the implicit declaration of an assignment operator of the derived class, even if the base class assignment operator, when considered as a member of the derived class, is a copy assignment operator or a move assignment operator ([class.copy.assign]).

I think this is repairable editorially, but not by a one-word change.

@opensdh
Copy link
Contributor

opensdh commented Nov 24, 2020

This sentence is turned into a note by #4326.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Nov 28, 2020

Thanks! We still need to address this, though. The new note currently says:

A using-declaration that names an assignment operator with a parameter type that could be that of a copy/move assignment operator for a derived class does not suppress the implicit declaration of the derived class operator [namespace.udecl].

@opensdh
Copy link
Contributor

opensdh commented Nov 30, 2020

Can't we just say "whose parameter type is appropriate for a copy/move assignment operator"? A slightly broader change, based loosely on Richard's normative-option suggestion, would be

A using-declaration in a derived class C that names an assignment operator that would be a copy or move assignment operator if declared as a member of C does not suppress the implicit declaration of the operator in C ([namespace.udecl]).

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 a pull request may close this issue.

3 participants