diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-04-08 02:42:59 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-04-08 02:42:59 (GMT) |
commit | 6323646e196fc0c9a7ef5c67143acf2180ec906f (patch) | |
tree | 01aa0ce0e4eb53ace14ef8eae8b29e1a50f8fb29 /include/gtest | |
parent | 7d560ed6999b817688cb93633a4b255e7f1e9011 (diff) | |
download | googletest-6323646e196fc0c9a7ef5c67143acf2180ec906f.zip googletest-6323646e196fc0c9a7ef5c67143acf2180ec906f.tar.gz googletest-6323646e196fc0c9a7ef5c67143acf2180ec906f.tar.bz2 |
fixes XL C++ compiler errors (by Pasi Valminen)
Diffstat (limited to 'include/gtest')
-rw-r--r-- | include/gtest/internal/gtest-internal.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index fcf4c71..cd6fd79 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -788,13 +788,14 @@ struct RemoveConst { typedef T type; }; // NOLINT template <typename T> struct RemoveConst<const T> { typedef T type; }; // NOLINT -// 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) +// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above +// definition to fail to remove the const in 'const int[3]' and 'const +// char[3][4]'. 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) || defined(__IBMCPP__) template <typename T, size_t N> -struct RemoveConst<T[N]> { +struct RemoveConst<const T[N]> { typedef typename RemoveConst<T>::type type[N]; }; #endif |