From 3aa2af18a9c47b16824fe0e7462c807533fcdea7 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Fri, 8 Apr 2011 02:42:59 +0000 Subject: fixes XL C++ compiler errors (by Pasi Valminen) git-svn-id: http://googletest.googlecode.com/svn/trunk@566 861a406c-534a-0410-8894-cb66d6ee9925 --- include/gtest/internal/gtest-internal.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include') 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 struct RemoveConst { 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 -struct RemoveConst { +struct RemoveConst { typedef typename RemoveConst::type type[N]; }; #endif -- cgit v1.2.3