diff options
author | Gennadiy Civil <misterg@google.com> | 2018-03-29 13:46:13 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-03-29 13:46:13 (GMT) |
commit | 8e0364a37b68433cd468b68e9d1e44cc7df3c742 (patch) | |
tree | 6aa457524bd0cfdfe6f60eca1d8b7bf8053f33e6 /googletest/include/gtest/internal/gtest-port.h | |
parent | 9dde7c4e8c46a65ad6215440bb396ad219e06ed4 (diff) | |
download | googletest-8e0364a37b68433cd468b68e9d1e44cc7df3c742.zip googletest-8e0364a37b68433cd468b68e9d1e44cc7df3c742.tar.gz googletest-8e0364a37b68433cd468b68e9d1e44cc7df3c742.tar.bz2 |
merging gtest-port, 2refs/pull/1525/head
Diffstat (limited to 'googletest/include/gtest/internal/gtest-port.h')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 8da15c8..0455658 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -663,6 +663,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // Determines whether Google Test's own tr1 tuple implementation // should be used. #ifndef GTEST_USE_OWN_TR1_TUPLE + // 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 @@ -694,6 +695,10 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # define GTEST_USE_OWN_TR1_TUPLE 1 # endif + +# if GTEST_OS_SYMBIAN +# define GTEST_USE_OWN_TR1_TUPLE 1 +# endif // GTEST_OS_SYMBIAN #endif // GTEST_USE_OWN_TR1_TUPLE // To avoid conditional compilation we make it gtest-port.h's responsibility @@ -712,22 +717,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # if GTEST_USE_OWN_TR1_TUPLE # include "gtest/internal/gtest-tuple.h" // IWYU pragma: export // NOLINT -# elif GTEST_ENV_HAS_STD_TUPLE_ -# include <tuple> -// C++11 puts its tuple into the ::std namespace rather than -// ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there. -// This causes undefined behavior, but supported compilers react in -// the way we intend. -namespace std { -namespace tr1 { -using ::std::get; -using ::std::make_tuple; -using ::std::tuple; -using ::std::tuple_element; -using ::std::tuple_size; -} -} - # elif GTEST_OS_SYMBIAN // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to @@ -744,29 +733,12 @@ using ::std::tuple_size; # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED # include <tuple> // IWYU pragma: export // NOLINT -# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does -// not conform to the TR1 spec, which requires the header to be <tuple>. - -# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 -// Until version 4.3.2, gcc has a bug that causes <tr1/functional>, -// which is #included by <tr1/tuple>, to not compile when RTTI is -// disabled. _TR1_FUNCTIONAL is the header guard for -// <tr1/functional>. Hence the following #define is a hack to prevent -// <tr1/functional> from being included. -# define _TR1_FUNCTIONAL 1 -# include <tr1/tuple> -# undef _TR1_FUNCTIONAL // Allows the user to #include - // <tr1/functional> if they choose to. -# else -# include <tr1/tuple> // 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. +// VS 2010 now has tr1 support. +# elif _MSC_VER >= 1600 # include <tuple> // IWYU pragma: export // NOLINT +# else // GTEST_USE_OWN_TR1_TUPLE +# include <tr1/tuple> // IWYU pragma: export // NOLINT # endif // GTEST_USE_OWN_TR1_TUPLE #endif // GTEST_HAS_TR1_TUPLE |