From 080fcbe0aae28dec00c2903ea04f2d2b022deb12 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 16 Mar 2018 13:36:36 -0400 Subject: cl 189032107 --- googlemock/include/gmock/gmock-spec-builders.h | 1 - googlemock/test/gmock-matchers_test.cc | 1 - googletest/include/gtest/internal/gtest-internal.h | 26 ++++++++-------------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index f8e1c6a..c1b6301 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -563,7 +563,6 @@ class ExpectationSet { public: // A bidirectional iterator that can read a const element in the set. typedef Expectation::Set::const_iterator const_iterator; - typedef Expectation::Set::iterator iterator; // An object stored in the set. This is an alias of Expectation. typedef Expectation::Set::value_type value_type; diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index f7bf2a8..829935e 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -4526,7 +4526,6 @@ class Streamlike { class ConstIter; public: typedef ConstIter const_iterator; - typedef ConstIter iterator; typedef T value_type; template diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 612f8a4..6e904a8 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -940,27 +940,19 @@ struct IsRecursiveContainerImpl; template struct IsRecursiveContainerImpl : public false_type {}; +// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to +// obey the same inconsistencies as the IsContainerTest, namely check if +// something is a container is relying on only const_iterator in C++11 and +// is relying on both const_iterator and iterator otherwise template struct IsRecursiveContainerImpl { - template - struct VoidT { - typedef void value_type; - }; - template - struct PathTraits { - typedef typename C1::const_iterator::value_type value_type; - }; - template - struct PathTraits< - C2, typename VoidT::value_type> { - typedef typename C2::iterator::value_type value_type; - }; - typedef typename IteratorTraits::value_type value_type; -#if GTEST_LANG_CXX11 - typedef std::is_same type; + #if GTEST_LANG_CXX11 + typedef typename IteratorTraits::value_type + value_type; #else - typedef is_same type; + typedef typename IteratorTraits::value_type value_type; #endif + typedef is_same type; }; // IsRecursiveContainer is a unary compile-time predicate that -- cgit v0.12