From edbcd6294e399be1ec2400c33b9d3aa9f6dbbf85 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 5 Jan 2010 20:44:37 +0000 Subject: Fixes issue 217: lets MSVC 10 uses its own tr1 tuple. --- include/gtest/internal/gtest-port.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index fcca592e..c3940b1b 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -354,16 +354,15 @@ // The user didn't tell us, so we need to figure it out. // We use our own tr1 tuple if we aren't sure the user has an -// implementation of it already. At this time, GCC 4.0.0+ is the only -// mainstream compiler that comes with a TR1 tuple implementation. -// MSVC 2008 (9.0) provides TR1 tuple in a 323 MB Feature Pack -// download, which we cannot assume the user has. MSVC 2010 isn't -// released yet. -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) +// implementation of it already. At this time, GCC 4.0.0+ and MSVC +// 2010 are the only mainstream compilers that come with a TR1 tuple +// implementation. MSVC 2008 (9.0) provides TR1 tuple in a 323 MB +// Feature Pack download, which we cannot assume the user has. +#if (defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)) || _MSV_VER >= 1600 #define GTEST_USE_OWN_TR1_TUPLE 0 #else #define GTEST_USE_OWN_TR1_TUPLE 1 -#endif // defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) +#endif #endif // GTEST_USE_OWN_TR1_TUPLE @@ -405,13 +404,13 @@ #undef _TR1_FUNCTIONAL // Allows the user to #include // if he chooses to. #else -#include +#include // NOLINT #endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 #else // If the compiler is not GCC 4.0+, we assume the user is using a // spec-conforming TR1 implementation. -#include +#include // NOLINT #endif // GTEST_USE_OWN_TR1_TUPLE #endif // GTEST_HAS_TR1_TUPLE -- cgit v1.2.3