From a77ba114663e4bf3bb13857e839376075af88a72 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Thu, 14 Apr 2022 09:52:38 -0700 Subject: [PATCH] Cherry-pick googletest/pull/2815 Cherry-pick https://github.com/google/googletest/pull/2815 to fix the -Wdeprecated-copy warnings of recent versions of Clang (13 or later). The patch was suggested by Mark Wachsler. Change-Id: I0cc88543e7bc68af6292ddc3773dad38c459cc72 --- third_party/googletest/README.libaom | 1 + .../googlemock/include/gmock/gmock-actions.h | 36 ------- .../include/gmock/gmock-generated-actions.h | 4 - .../gmock/gmock-generated-actions.h.pump | 4 - .../googlemock/include/gmock/gmock-matchers.h | 101 +----------------- .../include/gmock/gmock-spec-builders.h | 9 +- .../src/googlemock/src/gmock-matchers.cc | 2 - .../include/gtest/internal/gtest-internal.h | 2 - .../include/gtest/internal/gtest-port.h | 10 +- 9 files changed, 12 insertions(+), 157 deletions(-) diff --git a/third_party/googletest/README.libaom b/third_party/googletest/README.libaom index f3638538a6e..686445c29d7 100644 --- a/third_party/googletest/README.libaom +++ b/third_party/googletest/README.libaom @@ -31,3 +31,4 @@ Local Modifications: src - Enable kErrorOnUninstantiatedParameterizedTest and kErrorOnUninstantiatedTypeParameterizedTest in gtest.cc +- Cherry-pick https://github.com/google/googletest/pull/2815. diff --git a/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h b/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h index e46bcaa7947..cdd22a335e6 100644 --- a/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h +++ b/third_party/googletest/src/googlemock/include/gmock/gmock-actions.h @@ -540,13 +540,9 @@ class PolymorphicAction { private: Impl impl_; - - GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); }; Impl impl_; - - GTEST_DISALLOW_ASSIGN_(PolymorphicAction); }; // Creates an Action from its implementation and returns it. The @@ -687,13 +683,9 @@ class ReturnAction { private: bool performed_; const std::shared_ptr wrapper_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; const std::shared_ptr value_; - - GTEST_DISALLOW_ASSIGN_(ReturnAction); }; // Implements the ReturnNull() action. @@ -754,13 +746,9 @@ class ReturnRefAction { private: T& ref_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; T& ref_; - - GTEST_DISALLOW_ASSIGN_(ReturnRefAction); }; // Implements the polymorphic ReturnRefOfCopy(x) action, which can be @@ -801,13 +789,9 @@ class ReturnRefOfCopyAction { private: T value_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; const T value_; - - GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction); }; // Implements the polymorphic ReturnRoundRobin(v) action, which can be @@ -864,8 +848,6 @@ class AssignAction { private: T1* const ptr_; const T2 value_; - - GTEST_DISALLOW_ASSIGN_(AssignAction); }; #if !GTEST_OS_WINDOWS_MOBILE @@ -887,8 +869,6 @@ class SetErrnoAndReturnAction { private: const int errno_; const T result_; - - GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction); }; #endif // !GTEST_OS_WINDOWS_MOBILE @@ -993,13 +973,9 @@ class IgnoreResultAction { OriginalFunction; const Action action_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; const A action_; - - GTEST_DISALLOW_ASSIGN_(IgnoreResultAction); }; template @@ -1436,13 +1412,7 @@ auto InvokeArgumentAdl(AdlTag, F f, Args... args) -> decltype(f(args...)) { template \ return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \ GMOCK_ACTION_FIELD_PARAMS_(params) \ - \ - private: \ - GTEST_DISALLOW_ASSIGN_(gmock_Impl); \ }; \ - \ - private: \ - GTEST_DISALLOW_ASSIGN_(full_name); \ }; \ template \ inline full_name name( \ @@ -1481,13 +1451,7 @@ auto InvokeArgumentAdl(AdlTag, F f, Args... args) -> decltype(f(args...)) { } \ template \ return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \ - \ - private: \ - GTEST_DISALLOW_ASSIGN_(gmock_Impl); \ }; \ - \ - private: \ - GTEST_DISALLOW_ASSIGN_(name##Action); \ }; \ inline name##Action name() { return name##Action(); } \ template \ diff --git a/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h b/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h index c78debef077..0fe6acbc541 100644 --- a/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h +++ b/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h @@ -435,16 +435,12 @@ template \ return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const;\ GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ };\ template operator ::testing::Action() const {\ return ::testing::Action(\ new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ }\ GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\ };\ template \ diff --git a/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump b/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump index be9d99fed20..02fd9ff7ad1 100644 --- a/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/third_party/googletest/src/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -253,16 +253,12 @@ $range k 0..n-1 template \ return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const;\ GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ };\ template operator ::testing::Action() const {\ return ::testing::Action(\ new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ }\ GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\ };\ template \ diff --git a/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h b/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h index 4b6ac5634ec..25e0bfbb2d2 100644 --- a/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h +++ b/third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h @@ -437,8 +437,6 @@ class MatcherCastImpl > { private: const Matcher source_matcher_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; }; @@ -854,13 +852,9 @@ class RefMatcher { private: const Super& object_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; T& object_; - - GTEST_DISALLOW_ASSIGN_(RefMatcher); }; // Polymorphic helper functions for narrow and wide string matchers. @@ -963,8 +957,6 @@ class StrEqualityMatcher { const StringType string_; const bool expect_eq_; const bool case_sensitive_; - - GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher); }; // Implements the polymorphic HasSubstr(substring) matcher, which @@ -1019,8 +1011,6 @@ class HasSubstrMatcher { private: const StringType substring_; - - GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher); }; // Implements the polymorphic StartsWith(substring) matcher, which @@ -1076,8 +1066,6 @@ class StartsWithMatcher { private: const StringType prefix_; - - GTEST_DISALLOW_ASSIGN_(StartsWithMatcher); }; // Implements the polymorphic EndsWith(substring) matcher, which @@ -1132,8 +1120,6 @@ class EndsWithMatcher { private: const StringType suffix_; - - GTEST_DISALLOW_ASSIGN_(EndsWithMatcher); }; // Implements a matcher that compares the two fields of a 2-tuple @@ -1227,8 +1213,6 @@ class NotMatcherImpl : public MatcherInterface { private: const Matcher matcher_; - - GTEST_DISALLOW_ASSIGN_(NotMatcherImpl); }; // Implements the Not(m) matcher, which matches a value that doesn't @@ -1247,8 +1231,6 @@ class NotMatcher { private: InnerMatcher matcher_; - - GTEST_DISALLOW_ASSIGN_(NotMatcher); }; // Implements the AllOf(m1, m2) matcher for a particular argument type @@ -1310,8 +1292,6 @@ class AllOfMatcherImpl : public MatcherInterface { private: const std::vector > matchers_; - - GTEST_DISALLOW_ASSIGN_(AllOfMatcherImpl); }; // VariadicMatcher is used for the variadic implementation of @@ -1326,6 +1306,9 @@ class VariadicMatcher { static_assert(sizeof...(Args) > 0, "Must have at least one matcher."); } + VariadicMatcher(const VariadicMatcher&) = default; + VariadicMatcher& operator=(const VariadicMatcher&) = delete; + // This template type conversion operator allows an // VariadicMatcher object to match any type that // all of the provided matchers (Matcher1, Matcher2, ...) can match. @@ -1350,8 +1333,6 @@ class VariadicMatcher { std::integral_constant) const {} std::tuple matchers_; - - GTEST_DISALLOW_ASSIGN_(VariadicMatcher); }; template @@ -1416,8 +1397,6 @@ class AnyOfMatcherImpl : public MatcherInterface { private: const std::vector > matchers_; - - GTEST_DISALLOW_ASSIGN_(AnyOfMatcherImpl); }; // AnyOfMatcher is used for the variadic implementation of AnyOf(m_1, m_2, ...). @@ -1445,8 +1424,6 @@ class SomeOfArrayMatcher { private: const ::std::vector matchers_; - - GTEST_DISALLOW_ASSIGN_(SomeOfArrayMatcher); }; template @@ -1490,8 +1467,6 @@ class TrulyMatcher { private: Predicate predicate_; - - GTEST_DISALLOW_ASSIGN_(TrulyMatcher); }; // Used for implementing Matches(matcher), which turns a matcher into @@ -1528,8 +1503,6 @@ class MatcherAsPredicate { private: M matcher_; - - GTEST_DISALLOW_ASSIGN_(MatcherAsPredicate); }; // For implementing ASSERT_THAT() and EXPECT_THAT(). The template @@ -1580,8 +1553,6 @@ class PredicateFormatterFromMatcher { private: const M matcher_; - - GTEST_DISALLOW_ASSIGN_(PredicateFormatterFromMatcher); }; // A helper function for converting a matcher to a predicate-formatter @@ -1733,8 +1704,6 @@ class FloatingEqMatcher { const bool nan_eq_nan_; // max_abs_error will be used for value comparison when >= 0. const FloatType max_abs_error_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; // The following 3 type conversion operators allow FloatEq(expected) and @@ -1763,8 +1732,6 @@ class FloatingEqMatcher { const bool nan_eq_nan_; // max_abs_error will be used for value comparison when >= 0. const FloatType max_abs_error_; - - GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher); }; // A 2-tuple ("binary") wrapper around FloatingEqMatcher: @@ -1894,13 +1861,9 @@ class PointeeMatcher { private: const Matcher matcher_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; const InnerMatcher matcher_; - - GTEST_DISALLOW_ASSIGN_(PointeeMatcher); }; #if GTEST_HAS_RTTI @@ -1937,8 +1900,6 @@ class WhenDynamicCastToMatcherBase { static void GetCastTypeDescription(::std::ostream* os) { *os << "when dynamic_cast to " << GetToName() << ", "; } - - GTEST_DISALLOW_ASSIGN_(WhenDynamicCastToMatcherBase); }; // Primary template. @@ -2036,8 +1997,6 @@ class FieldMatcher { // Contains either "whose given field " if the name of the field is unknown // or "whose field `name_of_field` " if the name is known. const std::string whose_field_; - - GTEST_DISALLOW_ASSIGN_(FieldMatcher); }; // Implements the Property() matcher for matching a property @@ -2106,8 +2065,6 @@ class PropertyMatcher { // Contains either "whose given property " if the name of the property is // unknown or "whose property `name_of_property` " if the name is known. const std::string whose_property_; - - GTEST_DISALLOW_ASSIGN_(PropertyMatcher); }; // Type traits specifying various features of different functors for ResultOf. @@ -2197,14 +2154,10 @@ class ResultOfMatcher { // how many times the callable will be invoked. mutable CallableStorageType callable_; const Matcher matcher_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; // class Impl const CallableStorageType callable_; const InnerMatcher matcher_; - - GTEST_DISALLOW_ASSIGN_(ResultOfMatcher); }; // Implements a matcher that checks the size of an STL-style container. @@ -2249,12 +2202,10 @@ class SizeIsMatcher { private: const Matcher size_matcher_; - GTEST_DISALLOW_ASSIGN_(Impl); }; private: const SizeMatcher size_matcher_; - GTEST_DISALLOW_ASSIGN_(SizeIsMatcher); }; // Implements a matcher that checks the begin()..end() distance of an STL-style @@ -2306,12 +2257,10 @@ class BeginEndDistanceIsMatcher { private: const Matcher distance_matcher_; - GTEST_DISALLOW_ASSIGN_(Impl); }; private: const DistanceMatcher distance_matcher_; - GTEST_DISALLOW_ASSIGN_(BeginEndDistanceIsMatcher); }; // Implements an equality matcher for any STL-style container whose elements @@ -2404,8 +2353,6 @@ class ContainerEqMatcher { private: const StlContainer expected_; - - GTEST_DISALLOW_ASSIGN_(ContainerEqMatcher); }; // A comparator functor that uses the < operator to compare two values. @@ -2487,8 +2434,6 @@ class WhenSortedByMatcher { private: const Comparator comparator_; const ContainerMatcher matcher_; - - GTEST_DISALLOW_ASSIGN_(WhenSortedByMatcher); }; // Implements Pointwise(tuple_matcher, rhs_container). tuple_matcher @@ -2604,15 +2549,11 @@ class PointwiseMatcher { private: const Matcher mono_tuple_matcher_; const RhsStlContainer rhs_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; private: const TupleMatcher tuple_matcher_; const RhsStlContainer rhs_; - - GTEST_DISALLOW_ASSIGN_(PointwiseMatcher); }; // Holds the logic common to ContainsMatcherImpl and EachMatcherImpl. @@ -2655,8 +2596,6 @@ class QuantifierMatcherImpl : public MatcherInterface { protected: const Matcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(QuantifierMatcherImpl); }; // Implements Contains(element_matcher) for the given argument type Container. @@ -2683,9 +2622,6 @@ class ContainsMatcherImpl : public QuantifierMatcherImpl { MatchResultListener* listener) const override { return this->MatchAndExplainImpl(false, container, listener); } - - private: - GTEST_DISALLOW_ASSIGN_(ContainsMatcherImpl); }; // Implements Each(element_matcher) for the given argument type Container. @@ -2712,9 +2648,6 @@ class EachMatcherImpl : public QuantifierMatcherImpl { MatchResultListener* listener) const override { return this->MatchAndExplainImpl(true, container, listener); } - - private: - GTEST_DISALLOW_ASSIGN_(EachMatcherImpl); }; // Implements polymorphic Contains(element_matcher). @@ -2731,8 +2664,6 @@ class ContainsMatcher { private: const M inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(ContainsMatcher); }; // Implements polymorphic Each(element_matcher). @@ -2749,8 +2680,6 @@ class EachMatcher { private: const M inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(EachMatcher); }; struct Rank1 {}; @@ -2821,8 +2750,6 @@ class KeyMatcherImpl : public MatcherInterface { private: const Matcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(KeyMatcherImpl); }; // Implements polymorphic Key(matcher_for_key). @@ -2839,8 +2766,6 @@ class KeyMatcher { private: const M matcher_for_key_; - - GTEST_DISALLOW_ASSIGN_(KeyMatcher); }; // Implements Pair(first_matcher, second_matcher) for the given argument pair @@ -2926,8 +2851,6 @@ class PairMatcherImpl : public MatcherInterface { const Matcher first_matcher_; const Matcher second_matcher_; - - GTEST_DISALLOW_ASSIGN_(PairMatcherImpl); }; // Implements polymorphic Pair(first_matcher, second_matcher). @@ -2946,8 +2869,6 @@ class PairMatcher { private: const FirstMatcher first_matcher_; const SecondMatcher second_matcher_; - - GTEST_DISALLOW_ASSIGN_(PairMatcher); }; // Implements ElementsAre() and ElementsAreArray(). @@ -3093,8 +3014,6 @@ class ElementsAreMatcherImpl : public MatcherInterface { size_t count() const { return matchers_.size(); } ::std::vector > matchers_; - - GTEST_DISALLOW_ASSIGN_(ElementsAreMatcherImpl); }; // Connectivity matrix of (elements X matchers), in element-major order. @@ -3197,8 +3116,6 @@ class GTEST_API_ UnorderedElementsAreMatcherImplBase { private: UnorderedMatcherRequire::Flags match_flags_; MatcherDescriberVec matcher_describers_; - - GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcherImplBase); }; // Implements UnorderedElementsAre, UnorderedElementsAreArray, IsSubsetOf, and @@ -3294,8 +3211,6 @@ class UnorderedElementsAreMatcherImpl } ::std::vector > matchers_; - - GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcherImpl); }; // Functor for use in TransformTuple. @@ -3333,7 +3248,6 @@ class UnorderedElementsAreMatcher { private: const MatcherTuple matchers_; - GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcher); }; // Implements ElementsAre. @@ -3363,7 +3277,6 @@ class ElementsAreMatcher { private: const MatcherTuple matchers_; - GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher); }; // Implements UnorderedElementsAreArray(), IsSubsetOf(), and IsSupersetOf(). @@ -3385,8 +3298,6 @@ class UnorderedElementsAreArrayMatcher { private: UnorderedMatcherRequire::Flags match_flags_; ::std::vector matchers_; - - GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreArrayMatcher); }; // Implements ElementsAreArray(). @@ -3408,8 +3319,6 @@ class ElementsAreArrayMatcher { private: const ::std::vector matchers_; - - GTEST_DISALLOW_ASSIGN_(ElementsAreArrayMatcher); }; // Given a 2-tuple matcher tm of type Tuple2Matcher and a value second @@ -3471,8 +3380,6 @@ class BoundSecondMatcher { private: const Matcher mono_tuple2_matcher_; const Second second_value_; - - GTEST_DISALLOW_ASSIGN_(Impl); }; const Tuple2Matcher tuple2_matcher_; @@ -3545,12 +3452,10 @@ class OptionalMatcher { private: const Matcher value_matcher_; - GTEST_DISALLOW_ASSIGN_(Impl); }; private: const ValueMatcher value_matcher_; - GTEST_DISALLOW_ASSIGN_(OptionalMatcher); }; namespace variant_matcher { diff --git a/third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h b/third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h index 718c9484abc..a08a2bea89b 100644 --- a/third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h +++ b/third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h @@ -499,7 +499,10 @@ class GTEST_API_ Expectation { public: // Constructs a null object that doesn't reference any expectation. Expectation(); - + Expectation(Expectation&&) = default; + Expectation(const Expectation&) = default; + Expectation& operator=(Expectation&&) = default; + Expectation& operator=(const Expectation&) = default; ~Expectation(); // This single-argument ctor must not be explicit, in order to support the @@ -879,8 +882,6 @@ class GTEST_API_ ExpectationBase { Clause last_clause_; mutable bool action_count_checked_; // Under mutex_. mutable Mutex mutex_; // Protects action_count_checked_. - - GTEST_DISALLOW_ASSIGN_(ExpectationBase); }; // class ExpectationBase // Impements an expectation for the given function type. @@ -1295,8 +1296,6 @@ class MockSpec { internal::FunctionMocker* const function_mocker_; // The argument matchers specified in the spec. ArgumentMatcherTuple matchers_; - - GTEST_DISALLOW_ASSIGN_(MockSpec); }; // class MockSpec // Wrapper type for generically holding an ordinary value or lvalue reference. diff --git a/third_party/googletest/src/googlemock/src/gmock-matchers.cc b/third_party/googletest/src/googlemock/src/gmock-matchers.cc index 4f73e0a69cb..dded437addb 100644 --- a/third_party/googletest/src/googlemock/src/gmock-matchers.cc +++ b/third_party/googletest/src/googlemock/src/gmock-matchers.cc @@ -218,8 +218,6 @@ class MaxBipartiteMatchState { // right_[left_[i]] = i. ::std::vector left_; ::std::vector right_; - - GTEST_DISALLOW_ASSIGN_(MaxBipartiteMatchState); }; const size_t MaxBipartiteMatchState::kUnused; diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h index 9640aba836f..2e1967264d2 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h @@ -1125,8 +1125,6 @@ class NativeArray { const Element *array_; size_t size_; void (NativeArray::*clone_)(const Element *, size_t); - - GTEST_DISALLOW_ASSIGN_(NativeArray); }; // Backport of std::index_sequence. diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h index 083da569fe9..cb350348040 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h @@ -674,8 +674,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow copy constructor and operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \ - type(type const &) = delete; \ - GTEST_DISALLOW_ASSIGN_(type) + type(type const&) = delete; \ + type& operator=(type const&) = delete // A macro to disallow move operator= // This should be used in the private: declarations for a class. @@ -685,8 +685,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow move constructor and operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \ - type(type &&) noexcept = delete; \ - GTEST_DISALLOW_MOVE_ASSIGN_(type) + type(type&&) noexcept = delete; \ + type& operator=(type&&) noexcept = delete // Tell the compiler to warn about unused return values for functions declared // with this macro. The macro should be used on function declarations @@ -910,8 +910,6 @@ class GTEST_API_ RE { const char *full_pattern_; // For FullMatch(); #endif - - GTEST_DISALLOW_ASSIGN_(RE); }; #endif // GTEST_USES_PCRE