mirror of
https://github.com/google/googletest.git
synced 2025-01-21 15:11:57 +08:00
fixes XL C++ compiler errors (by Pasi Valminen)
This commit is contained in:
parent
7d560ed699
commit
6323646e19
@ -788,13 +788,14 @@ struct RemoveConst { typedef T type; }; // NOLINT
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct RemoveConst<const T> { typedef T type; }; // NOLINT
|
struct RemoveConst<const T> { typedef T type; }; // NOLINT
|
||||||
|
|
||||||
// MSVC 8.0 and Sun C++ have a bug which causes the above definition
|
// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
|
||||||
// to fail to remove the const in 'const int[3]'. The following
|
// definition to fail to remove the const in 'const int[3]' and 'const
|
||||||
// specialization works around the bug. However, it causes trouble
|
// char[3][4]'. The following specialization works around the bug.
|
||||||
// with GCC and thus needs to be conditionally compiled.
|
// However, it causes trouble with GCC and thus needs to be
|
||||||
#if defined(_MSC_VER) || defined(__SUNPRO_CC)
|
// conditionally compiled.
|
||||||
|
#if defined(_MSC_VER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
struct RemoveConst<T[N]> {
|
struct RemoveConst<const T[N]> {
|
||||||
typedef typename RemoveConst<T>::type type[N];
|
typedef typename RemoveConst<T>::type type[N];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user