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

Should "Copy Operation" be a word of power? #448

Open
mclow opened this issue Feb 25, 2015 · 3 comments
Open

Should "Copy Operation" be a word of power? #448

mclow opened this issue Feb 25, 2015 · 3 comments

Comments

@mclow
Copy link
Contributor

mclow commented Feb 25, 2015

The phrase "Copy operation" (meaning, apparently, copy construction and assignment) is used as part of class.copy, and then again in allocator.requirements (twice).

Should it be a formal term in the standard?

@cpplearner
Copy link
Contributor

Not so apparent. The "copy operation" in [class.copy]p31 means copy construction only, and the ones in [allocator.requirements] can be replaced by "copy assignment".

Also note that there are

  • "copy or move operation" in [stmt.return]p2 and [iterator.requirements.general]p6
  • "copy/move operation" in [class.copy]p31&32 and [except.throw]p5
  • "move operation" in [allocator.requirements]p4&5.

If I'm not mistaken, only the "copy or move operation" in [iterator.requirements.general]p6 refers to both construction and assignment operation.

@jensmaurer
Copy link
Member

Note that a copy might be performed by something that is not a copy constructor as defined in 12.8 [class.copy]. Nowadays, we run full overload resolution on the constructors for the copy, and we might actually choose a constructor template (which is never a copy constructor) to perform the copy. Therefore, changing "copy/move operation" to "copy/move construction" should be carefully considered on a case-by-case basis.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 5, 2018
@jensmaurer
Copy link
Member

Editorial meeting: Change [fs.enum.copy.opts] to use "file copy operation".
Use of "copy operation" in core language sections is fine (contrasts with "move operation").
The two in allocator requirements: the first is "copy assignment operation" clearly, and the second one is "copy assignment operation", too. Also change "move operation" to "move assignment operation". Also change "move operation" in p4.

[lib.types.movedfrom] use "move constructors and move assignment operators". Also drop "shall".

22.2.1p7 [iterator.requirements.general] "Whether singular or not, use of a value-initialized iterator ..." Assignment has two objects involved; are we discussing the source or target? Turn in this into a bulleted list. "whereby the singular value is overwritten"
--> "operation" -> "constructor or assignment operator/operation" and open a new issue that the wording is unclear.

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

3 participants