diff options
author | misterg <misterg@google.com> | 2018-10-08 14:30:02 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-08 14:51:03 (GMT) |
commit | fab35920ad7e709847a94175337b8674bea0f9ae (patch) | |
tree | 8805a79c91e80df8082575e4ca32d13f15d3d544 /googlemock/include/gmock/gmock-generated-matchers.h | |
parent | 40f82ce56a4b416aa4631e48d1d07377793b18ee (diff) | |
download | googletest-fab35920ad7e709847a94175337b8674bea0f9ae.zip googletest-fab35920ad7e709847a94175337b8674bea0f9ae.tar.gz googletest-fab35920ad7e709847a94175337b8674bea0f9ae.tar.bz2 |
Remove non-variadic pre C++11 AllOf
PiperOrigin-RevId: 216183352
Diffstat (limited to 'googlemock/include/gmock/gmock-generated-matchers.h')
-rw-r--r-- | googlemock/include/gmock/gmock-generated-matchers.h | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/googlemock/include/gmock/gmock-generated-matchers.h b/googlemock/include/gmock/gmock-generated-matchers.h index 16093bf..61fe66a 100644 --- a/googlemock/include/gmock/gmock-generated-matchers.h +++ b/googlemock/include/gmock/gmock-generated-matchers.h @@ -297,94 +297,6 @@ class ArgsMatcher { GTEST_DISALLOW_ASSIGN_(ArgsMatcher); }; -// A set of metafunctions for computing the result type of AllOf. -// AllOf(m1, ..., mN) returns -// AllOfResultN<decltype(m1), ..., decltype(mN)>::type. - -// Although AllOf isn't defined for one argument, AllOfResult1 is defined -// to simplify the implementation. -template <typename M1> -struct AllOfResult1 { - typedef M1 type; -}; - -template <typename M1, typename M2> -struct AllOfResult2 { - typedef BothOfMatcher< - typename AllOfResult1<M1>::type, - typename AllOfResult1<M2>::type - > type; -}; - -template <typename M1, typename M2, typename M3> -struct AllOfResult3 { - typedef BothOfMatcher< - typename AllOfResult1<M1>::type, - typename AllOfResult2<M2, M3>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4> -struct AllOfResult4 { - typedef BothOfMatcher< - typename AllOfResult2<M1, M2>::type, - typename AllOfResult2<M3, M4>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5> -struct AllOfResult5 { - typedef BothOfMatcher< - typename AllOfResult2<M1, M2>::type, - typename AllOfResult3<M3, M4, M5>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6> -struct AllOfResult6 { - typedef BothOfMatcher< - typename AllOfResult3<M1, M2, M3>::type, - typename AllOfResult3<M4, M5, M6>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7> -struct AllOfResult7 { - typedef BothOfMatcher< - typename AllOfResult3<M1, M2, M3>::type, - typename AllOfResult4<M4, M5, M6, M7>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8> -struct AllOfResult8 { - typedef BothOfMatcher< - typename AllOfResult4<M1, M2, M3, M4>::type, - typename AllOfResult4<M5, M6, M7, M8>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8, typename M9> -struct AllOfResult9 { - typedef BothOfMatcher< - typename AllOfResult4<M1, M2, M3, M4>::type, - typename AllOfResult5<M5, M6, M7, M8, M9>::type - > type; -}; - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8, typename M9, typename M10> -struct AllOfResult10 { - typedef BothOfMatcher< - typename AllOfResult5<M1, M2, M3, M4, M5>::type, - typename AllOfResult5<M6, M7, M8, M9, M10>::type - > type; -}; - // A set of metafunctions for computing the result type of AnyOf. // AnyOf(m1, ..., mN) returns // AnyOfResultN<decltype(m1), ..., decltype(mN)>::type. @@ -553,88 +465,6 @@ Args(const InnerMatcher& matcher) { k9, k10>(matcher); } -// AllOf(m1, m2, ..., mk) matches any value that matches all of the given -// sub-matchers. AllOf is called fully qualified to prevent ADL from firing. - -template <typename M1, typename M2> -inline typename internal::AllOfResult2<M1, M2>::type -AllOf(M1 m1, M2 m2) { - return typename internal::AllOfResult2<M1, M2>::type( - m1, - m2); -} - -template <typename M1, typename M2, typename M3> -inline typename internal::AllOfResult3<M1, M2, M3>::type -AllOf(M1 m1, M2 m2, M3 m3) { - return typename internal::AllOfResult3<M1, M2, M3>::type( - m1, - ::testing::AllOf(m2, m3)); -} - -template <typename M1, typename M2, typename M3, typename M4> -inline typename internal::AllOfResult4<M1, M2, M3, M4>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4) { - return typename internal::AllOfResult4<M1, M2, M3, M4>::type( - ::testing::AllOf(m1, m2), - ::testing::AllOf(m3, m4)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5> -inline typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5) { - return typename internal::AllOfResult5<M1, M2, M3, M4, M5>::type( - ::testing::AllOf(m1, m2), - ::testing::AllOf(m3, m4, m5)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6> -inline typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6) { - return typename internal::AllOfResult6<M1, M2, M3, M4, M5, M6>::type( - ::testing::AllOf(m1, m2, m3), - ::testing::AllOf(m4, m5, m6)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7> -inline typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7) { - return typename internal::AllOfResult7<M1, M2, M3, M4, M5, M6, M7>::type( - ::testing::AllOf(m1, m2, m3), - ::testing::AllOf(m4, m5, m6, m7)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8> -inline typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8) { - return typename internal::AllOfResult8<M1, M2, M3, M4, M5, M6, M7, M8>::type( - ::testing::AllOf(m1, m2, m3, m4), - ::testing::AllOf(m5, m6, m7, m8)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8, typename M9> -inline typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, M9>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9) { - return typename internal::AllOfResult9<M1, M2, M3, M4, M5, M6, M7, M8, - M9>::type( - ::testing::AllOf(m1, m2, m3, m4), - ::testing::AllOf(m5, m6, m7, m8, m9)); -} - -template <typename M1, typename M2, typename M3, typename M4, typename M5, - typename M6, typename M7, typename M8, typename M9, typename M10> -inline typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9, - M10>::type -AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { - return typename internal::AllOfResult10<M1, M2, M3, M4, M5, M6, M7, M8, M9, - M10>::type( - ::testing::AllOf(m1, m2, m3, m4, m5), - ::testing::AllOf(m6, m7, m8, m9, m10)); -} // AnyOf(m1, m2, ..., mk) matches any value that matches any of the given // sub-matchers. AnyOf is called fully qualified to prevent ADL from firing. |