summaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-06-13 19:00:37 (GMT)
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-06-13 19:00:37 (GMT)
commitcc265df8b44e613ca118ce5da145f91d66f6c440 (patch)
tree800a32dcfa5f87dcd0d6735b57d1c72e14305d5f /include/gtest/internal/gtest-internal.h
parent7e29bb7f7ebc2a1734415cb64395d87fc87d12be (diff)
downloadgoogletest-cc265df8b44e613ca118ce5da145f91d66f6c440.zip
googletest-cc265df8b44e613ca118ce5da145f91d66f6c440.tar.gz
googletest-cc265df8b44e613ca118ce5da145f91d66f6c440.tar.bz2
Fixes broken build on VC++ 7.1.
Diffstat (limited to 'include/gtest/internal/gtest-internal.h')
-rw-r--r--include/gtest/internal/gtest-internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h
index d0fe5f7..d883450 100644
--- a/include/gtest/internal/gtest-internal.h
+++ b/include/gtest/internal/gtest-internal.h
@@ -802,6 +802,16 @@ struct RemoveConst<const T[N]> {
typedef typename RemoveConst<T>::type type[N];
};
+#if defined(_MSC_VER) && _MSC_VER < 1400
+// This is the only specialization that allows VC++ 7.1 to remove const in
+// 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC
+// and thus needs to be conditionally compiled.
+template <typename T, size_t N>
+struct RemoveConst<T[N]> {
+ typedef typename RemoveConst<T>::type type[N];
+};
+#endif
+
// A handy wrapper around RemoveConst that works when the argument
// T depends on template parameters.
#define GTEST_REMOVE_CONST_(T) \