Fix Clang's -Wdeprecated-copy warnings in C++20#2758
Fix Clang's -Wdeprecated-copy warnings in C++20#2758Quuxplusone wants to merge 2 commits intogoogle:masterfrom
-Wdeprecated-copy warnings in C++20#2758Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
b53c283 to
29fc7f0
Compare
This is a more aggressively "modern" approach than my first few attempts. Apparently we can't just follow the Rule of Zero for the `Ne` matcher in particular, because if we do, one of the unit tests hits "recursive template instantiation exceeded maximum depth of 256" on Clang. Fixes google#1305.
… const/reference members. These classes are already non-assignable; we don't need to say so explicitly.
|
@gennadiycivil: Please commit this patch. @aardappel: Here's the GTest/GMock counterpart to google/flatbuffers#5829 . Do you have any sway over here? |
|
@Quuxplusone I'm afraid I don't :) |
zhangxy988
left a comment
There was a problem hiding this comment.
We don't want any macros, so please replace GTEST_DISALLOW_ASSIGN_BUT_DEFAULT_COPY_ by spelling it out. Thanks!
@zhangxy988: That's awesome news. Would you mind if I submitted another PR to remove these macros first (i.e. manually preprocess these macros throughout the codebase, without changing any behavior), and then submitted a followup PR with just localized fixes for the Clang C++20 warnings? I'll work on that tonight and add you as a reviewer on the PR(s). EDIT: well, I'll probably aim to make it one PR with two commits in it |
|
@zhangxy988: I've opened #2772 and #2773. Once those are both in, then I'll submit a PR for the macro removal and to add |
|
Abandoned in favor of #2815. |
Fixes #1305.
(I think. Hopefully you've got a buildbot that will tell me if this breaks something.)