Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

util: update definition of DISALLOW_COPY_AND_ASSIGN macro #23092

Closed
wants to merge 1 commit into from

Conversation

nitsakh
Copy link
Contributor

@nitsakh nitsakh commented Sep 25, 2018

This PR updates the DISALLOW_COPY_AND_ASSIGN macro.
The compiler will not define move constructor or move assignment operators when copy constructor/assignment is defined.
Hence, it's not needed to delete move operations.
This also makes the definition coherent with chromium's definition of the same. https://cs.chromium.org/chromium/src/base/macros.h?rcl=b209442fa2c29021b06a6dcbbd0486b440011fe2&l=33.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 25, 2018
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You're right they're not needed. I believe I added them to work around bugs in VS 2013 and left them in afterwards as self-documentation.

@addaleax
Copy link
Member

@addaleax addaleax added lib / src Issues and PRs related to general changes in the lib or src directory. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Sep 30, 2018
@danbev
Copy link
Contributor

danbev commented Oct 2, 2018

@danbev
Copy link
Contributor

danbev commented Oct 2, 2018

Re-run failing node-test-commit-osx.

@danbev
Copy link
Contributor

danbev commented Oct 2, 2018

Landed in 97f1e94.

@danbev danbev closed this Oct 2, 2018
danbev pushed a commit that referenced this pull request Oct 2, 2018
PR-URL: #23092
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Oct 3, 2018
PR-URL: #23092
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@nitsakh nitsakh deleted the copy-assign-macro branch October 4, 2018 05:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants