summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest-matchers.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-01-09 21:08:29 (GMT)
committerGennadiy Civil <misterg@google.com>2019-01-10 21:32:37 (GMT)
commitbc1023b4131c6e360803d4de2965a98afe3c146c (patch)
tree6f0d17f57f742fbf4417ea69f80a9469a783c017 /googletest/include/gtest/gtest-matchers.h
parent50f1a77955bde27cf49173c4133688d61f201e85 (diff)
downloadgoogletest-bc1023b4131c6e360803d4de2965a98afe3c146c.zip
googletest-bc1023b4131c6e360803d4de2965a98afe3c146c.tar.gz
googletest-bc1023b4131c6e360803d4de2965a98afe3c146c.tar.bz2
Googletest export
Fix warning about deprecation of implicit operations such as copy constructors or assignment operators. Specifically: MatcherBase's default copy constructor, assignment operator, move operator, and move assignment operator are now declared explicitly rather than depending on the compiler implicit generation (which is disallowed/warned against due to MatcherBase's declaration of the destructor). PiperOrigin-RevId: 228573333
Diffstat (limited to 'googletest/include/gtest/gtest-matchers.h')
-rw-r--r--googletest/include/gtest/gtest-matchers.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h
index 7bc855b..128fdb2 100644
--- a/googletest/include/gtest/gtest-matchers.h
+++ b/googletest/include/gtest/gtest-matchers.h
@@ -296,6 +296,11 @@ class MatcherBase {
!internal::IsSame<U, const U&>::value>::type* = nullptr)
: impl_(new internal::MatcherInterfaceAdapter<U>(impl)) {}
+ MatcherBase(const MatcherBase&) = default;
+ MatcherBase& operator=(const MatcherBase&) = default;
+ MatcherBase(MatcherBase&&) = default;
+ MatcherBase& operator=(MatcherBase&&) = default;
+
virtual ~MatcherBase() {}
private:
@@ -545,13 +550,9 @@ class PolymorphicMatcher {
private:
const Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);
};
Impl impl_;
-
- GTEST_DISALLOW_ASSIGN_(PolymorphicMatcher);
};
// Creates a matcher from its implementation. This is easier to use
@@ -618,10 +619,8 @@ class ComparisonBase {
private:
Rhs rhs_;
- GTEST_DISALLOW_ASSIGN_(Impl);
};
Rhs rhs_;
- GTEST_DISALLOW_ASSIGN_(ComparisonBase);
};
template <typename Rhs>
@@ -724,8 +723,6 @@ class MatchesRegexMatcher {
private:
const std::shared_ptr<const RE> regex_;
const bool full_match_;
-
- GTEST_DISALLOW_ASSIGN_(MatchesRegexMatcher);
};
} // namespace internal