summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-03-16 17:36:36 (GMT)
committerGennadiy Civil <misterg@google.com>2018-03-16 17:36:36 (GMT)
commit080fcbe0aae28dec00c2903ea04f2d2b022deb12 (patch)
tree3b6fc12bfdfec27cc96211c4ed4fa6e61b6eabc3 /googletest/include/gtest
parenta178cc7ef73ce7e6e7e688d3d5cbccfc3c1d5d6b (diff)
downloadgoogletest-080fcbe0aae28dec00c2903ea04f2d2b022deb12.zip
googletest-080fcbe0aae28dec00c2903ea04f2d2b022deb12.tar.gz
googletest-080fcbe0aae28dec00c2903ea04f2d2b022deb12.tar.bz2
cl 189032107
Diffstat (limited to 'googletest/include/gtest')
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h26
1 files changed, 9 insertions, 17 deletions
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 <typename C>
struct IsRecursiveContainerImpl<C, false> : 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 <typename C>
struct IsRecursiveContainerImpl<C, true> {
- template <typename T>
- struct VoidT {
- typedef void value_type;
- };
- template <typename C1, typename VT = void>
- struct PathTraits {
- typedef typename C1::const_iterator::value_type value_type;
- };
- template <typename C2>
- struct PathTraits<
- C2, typename VoidT<typename C2::iterator::value_type>::value_type> {
- typedef typename C2::iterator::value_type value_type;
- };
- typedef typename IteratorTraits<typename C::iterator>::value_type value_type;
-#if GTEST_LANG_CXX11
- typedef std::is_same<value_type, C> type;
+ #if GTEST_LANG_CXX11
+ typedef typename IteratorTraits<typename C::const_iterator>::value_type
+ value_type;
#else
- typedef is_same<value_type, C> type;
+ typedef typename IteratorTraits<typename C::iterator>::value_type value_type;
#endif
+ typedef is_same<value_type, C> type;
};
// IsRecursiveContainer<Type> is a unary compile-time predicate that