aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-matchers.h
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-10-09 16:26:28 -0400
committerGennadiy Civil <misterg@google.com>2018-10-09 16:30:37 -0400
commit78761b58fc9ae65acaebb6a9e34087e593c89c93 (patch)
tree73491fccf4e7173a4d7afe0a7b191fb507222e17 /googlemock/include/gmock/gmock-matchers.h
parent7d3b73c85a42811309eac26e5cbe054c40b64785 (diff)
downloadgoogletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.tar.gz
googletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.tar.bz2
googletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.zip
Remove non-variadic pre C++11 AnyOf
PiperOrigin-RevId: 216411381
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 08371f1b..cdb7367b 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -1879,40 +1879,10 @@ class AnyOfMatcherImpl
GTEST_DISALLOW_ASSIGN_(AnyOfMatcherImpl);
};
-#if GTEST_LANG_CXX11
// AnyOfMatcher is used for the variadic implementation of AnyOf(m_1, m_2, ...).
template <typename... Args>
using AnyOfMatcher = VariadicMatcher<AnyOfMatcherImpl, Args...>;
-#endif // GTEST_LANG_CXX11
-
-// Used for implementing the AnyOf(m_1, ..., m_n) matcher, which
-// matches a value that matches at least one of the matchers m_1, ...,
-// and m_n.
-template <typename Matcher1, typename Matcher2>
-class EitherOfMatcher {
- public:
- EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
- : matcher1_(matcher1), matcher2_(matcher2) {}
-
- // This template type conversion operator allows a
- // EitherOfMatcher<Matcher1, Matcher2> object to match any type that
- // both Matcher1 and Matcher2 can match.
- template <typename T>
- operator Matcher<T>() const {
- std::vector<Matcher<T> > values;
- values.push_back(SafeMatcherCast<T>(matcher1_));
- values.push_back(SafeMatcherCast<T>(matcher2_));
- return Matcher<T>(new AnyOfMatcherImpl<T>(internal::move(values)));
- }
-
- private:
- Matcher1 matcher1_;
- Matcher2 matcher2_;
-
- GTEST_DISALLOW_ASSIGN_(EitherOfMatcher);
-};
-
// Used for implementing Truly(pred), which turns a predicate into a
// matcher.
template <typename Predicate>