From e68adf5c9089b4e2b7d527eb398471a7728b2939 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 9 Jun 2009 05:52:03 +0000 Subject: Enables tr1 tuple on Symbian. --- include/gtest/internal/gtest-port.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include/gtest/internal') diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 6910e594..1b573e4c 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -359,7 +359,24 @@ // gtest-port.h's responsibility to #include the header implementing // tr1/tuple. #if GTEST_HAS_TR1_TUPLE -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) + +#if GTEST_OS_SYMBIAN + +// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to +// use STLport's tuple implementation, which unfortunately doesn't +// work as the copy of STLport distributed with Symbian is incomplete. +// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to +// use its own tuple implementation. +#ifdef BOOST_HAS_TR1_TUPLE +#undef BOOST_HAS_TR1_TUPLE +#endif // BOOST_HAS_TR1_TUPLE + +// This prevents , which defines +// BOOST_HAS_TR1_TUPLE, from being #included by Boost's . +#define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED +#include + +#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) // GCC 4.0+ implements tr1/tuple in the header. This does // not conform to the TR1 spec, which requires the header to be . #include @@ -367,7 +384,8 @@ // If the compiler is not GCC 4.0+, we assume the user is using a // spec-conforming TR1 implementation. #include -#endif // __GNUC__ +#endif // GTEST_OS_SYMBIAN + #endif // GTEST_HAS_TR1_TUPLE // Determines whether clone(2) is supported. -- cgit v1.2.3