-
- Downloads
Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.
None of these are strictly needed for correctness. A large number of them (maybe all of them?) trigger `-Wdeprecated` warnings on Clang trunk as soon as you try to use the implicitly defaulted (but deprecated) copy constructor of a class that has deleted its copy assignment operator. By declaring a deleted copy assignment operator, the old code also caused the move constructor and move assignment operator to be non-declared. This means that the old code never got move semantics -- "move-construction" would simply call the defaulted (but deprecated) copy constructor instead. With the new code, "move-construction" calls the defaulted move constructor, which I believe is what we want to happen. So this is a runtime performance optimization. Unfortunately we can't yet physically remove the definitions of these macros from gtest-port.h, because they are being used by other code internally at Google (according to zhangxy988). But no new uses should be added going forward.
Showing
- googlemock/include/gmock/gmock-actions.h 0 additions, 36 deletionsgooglemock/include/gmock/gmock-actions.h
- googlemock/include/gmock/gmock-generated-actions.h 0 additions, 4 deletionsgooglemock/include/gmock/gmock-generated-actions.h
- googlemock/include/gmock/gmock-generated-actions.h.pump 0 additions, 4 deletionsgooglemock/include/gmock/gmock-generated-actions.h.pump
- googlemock/include/gmock/gmock-matchers.h 0 additions, 96 deletionsgooglemock/include/gmock/gmock-matchers.h
- googlemock/include/gmock/gmock-spec-builders.h 0 additions, 4 deletionsgooglemock/include/gmock/gmock-spec-builders.h
- googlemock/src/gmock-matchers.cc 0 additions, 2 deletionsgooglemock/src/gmock-matchers.cc
- googlemock/test/gmock-actions_test.cc 0 additions, 2 deletionsgooglemock/test/gmock-actions_test.cc
- googlemock/test/gmock-matchers_test.cc 0 additions, 6 deletionsgooglemock/test/gmock-matchers_test.cc
- googletest/include/gtest/internal/gtest-internal.h 0 additions, 2 deletionsgoogletest/include/gtest/internal/gtest-internal.h
- googletest/include/gtest/internal/gtest-port.h 2 additions, 4 deletionsgoogletest/include/gtest/internal/gtest-port.h
- googletest/test/googletest-port-test.cc 0 additions, 2 deletionsgoogletest/test/googletest-port-test.cc
Loading
Please register or sign in to comment