From 78761b58fc9ae65acaebb6a9e34087e593c89c93 Mon Sep 17 00:00:00 2001 From: misterg Date: Tue, 9 Oct 2018 16:26:28 -0400 Subject: Remove non-variadic pre C++11 AnyOf PiperOrigin-RevId: 216411381 --- googlemock/include/gmock/gmock-matchers.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'googlemock/include/gmock/gmock-matchers.h') 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 using AnyOfMatcher = VariadicMatcher; -#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 -class EitherOfMatcher { - public: - EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - // This template type conversion operator allows a - // EitherOfMatcher object to match any type that - // both Matcher1 and Matcher2 can match. - template - operator Matcher() const { - std::vector > values; - values.push_back(SafeMatcherCast(matcher1_)); - values.push_back(SafeMatcherCast(matcher2_)); - return Matcher(new AnyOfMatcherImpl(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 -- cgit v1.2.3