Skip to content

AST: re-order copy constructor, remove extra copy constructor #19301

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

Merged
merged 1 commit into from
Sep 16, 2018

Conversation

compnerd
Copy link
Member

Visual Studio objects with the following:

AST/AnyRequest.h(243): error: C2580: 'swift::AnyRequest::AnyRequest(const swift::AnyRequest &)': multiple versions of a defaulted special member functions are not allowed
AST/AnyRequest(243): warning C4521: 'swift::AnyRequest': multiple copy constructors specified

Remove the non-const implementation, the default'ed definition should be
sufficient. Additionally, re-order to keep the const and non-const r-value ref
versions next to each other.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

CC: @DougGregor

@compnerd compnerd force-pushed the ast-special-copy branch 2 times, most recently from d259d5d to cbf974a Compare September 13, 2018 22:41
Visual Studio objects with the following:

```
  AST/AnyRequest.h(243): error: C2580: 'swift::AnyRequest::AnyRequest(const swift::AnyRequest &)': multiple versions of a defaulted special member functions are not allowed
  AST/AnyRequest(243): warning C4521: 'swift::AnyRequest': multiple copy constructors specified
```

Remove the non-const implementation, the default'ed definition should be
sufficient.  Additionally, remove the nonsense const move constructor.
@compnerd
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit a3264f6 into swiftlang:master Sep 16, 2018
@compnerd compnerd deleted the ast-special-copy branch September 16, 2018 22:19
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.

3 participants