From cc265df8b44e613ca118ce5da145f91d66f6c440 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Mon, 13 Jun 2011 19:00:37 +0000 Subject: Fixes broken build on VC++ 7.1. --- include/gtest/internal/gtest-internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/gtest/internal/gtest-internal.h') diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index d0fe5f79..d8834500 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -802,6 +802,16 @@ struct RemoveConst { typedef typename RemoveConst::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 +struct RemoveConst { + typedef typename RemoveConst::type type[N]; +}; +#endif + // A handy wrapper around RemoveConst that works when the argument // T depends on template parameters. #define GTEST_REMOVE_CONST_(T) \ -- cgit v1.2.3