diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-03-11 23:05:00 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-03-11 23:05:00 +0000 |
commit | 5017fe0090e8902d028ba38753c00d73f16d83f0 (patch) | |
tree | 855028aed973341aa041ee2468a0bd5293853616 /include/gtest/internal/gtest-internal.h | |
parent | 5451ffe816cafe4f0f51813eb8ddedb3543f0fea (diff) | |
download | googletest-5017fe0090e8902d028ba38753c00d73f16d83f0.tar.gz googletest-5017fe0090e8902d028ba38753c00d73f16d83f0.tar.bz2 googletest-5017fe0090e8902d028ba38753c00d73f16d83f0.zip |
Fixes compatibility with Sun C++ (by Hady Zalek); fixes compatibility
with Android (by Zachary Vorhies).
Diffstat (limited to 'include/gtest/internal/gtest-internal.h')
-rw-r--r-- | include/gtest/internal/gtest-internal.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index cfa3885c..fcf4c717 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -788,16 +788,16 @@ struct RemoveConst { typedef T type; }; // NOLINT template <typename T> struct RemoveConst<const T> { typedef T type; }; // NOLINT -// MSVC 8.0 has a bug which causes the above definition to fail to -// remove the const in 'const int[3]'. The following specialization -// works around the bug. However, it causes trouble with gcc and thus -// needs to be conditionally compiled. -#ifdef _MSC_VER +// MSVC 8.0 and Sun C++ have a bug which causes the above definition +// to fail to remove the const in 'const int[3]'. The following +// specialization works around the bug. However, it causes trouble +// with GCC and thus needs to be conditionally compiled. +#if defined(_MSC_VER) || defined(__SUNPRO_CC) template <typename T, size_t N> struct RemoveConst<T[N]> { typedef typename RemoveConst<T>::type type[N]; }; -#endif // _MSC_VER +#endif // A handy wrapper around RemoveConst that works when the argument // T depends on template parameters. |