diff options
author | Gennadiy Civil <misterg@google.com> | 2018-07-19 16:42:39 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-07-19 16:42:39 (GMT) |
commit | 0c17888bcfa7a05ae2cb14c1f5e2451ea9745211 (patch) | |
tree | ae60b93c3c71121250fb0afc1b47bb190e6e2923 /googlemock | |
parent | a3509a5aa49e1d17d12f54e714b4923b97d0f6bc (diff) | |
download | googletest-0c17888bcfa7a05ae2cb14c1f5e2451ea9745211.zip googletest-0c17888bcfa7a05ae2cb14c1f5e2451ea9745211.tar.gz googletest-0c17888bcfa7a05ae2cb14c1f5e2451ea9745211.tar.bz2 |
code sync
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 12 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index c94f582..7fd5787 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -5165,13 +5165,17 @@ std::string DescribeMatcher(const M& matcher, bool negation = false) { // Define variadic matcher versions. They are overloaded in // gmock-generated-matchers.h for the cases supported by pre C++11 compilers. template <typename... Args> -internal::AllOfMatcher<Args...> AllOf(const Args&... matchers) { - return internal::AllOfMatcher<Args...>(matchers...); +internal::AllOfMatcher<typename std::decay<const Args&>::type...> AllOf( + const Args&... matchers) { + return internal::AllOfMatcher<typename std::decay<const Args&>::type...>( + matchers...); } template <typename... Args> -internal::AnyOfMatcher<Args...> AnyOf(const Args&... matchers) { - return internal::AnyOfMatcher<Args...>(matchers...); +internal::AnyOfMatcher<typename std::decay<const Args&>::type...> AnyOf( + const Args&... matchers) { + return internal::AnyOfMatcher<typename std::decay<const Args&>::type...>( + matchers...); } template <typename... Args> diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index a451842..f9dfd3c 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -2795,6 +2795,7 @@ TEST(ElementsAreTest, HugeMatcherUnordered) { #endif // GTEST_LANG_CXX11 + // Tests that AnyOf(m1, ..., mn) describes itself properly. TEST(AnyOfTest, CanDescribeSelf) { Matcher<int> m; |