diff options
author | David Benjamin <davidben@google.com> | 2018-01-02 17:55:44 (GMT) |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2018-01-02 17:57:49 (GMT) |
commit | 90244a6aef73d28b7d300c5b3e9d7c94bd6f437a (patch) | |
tree | e55c5e13b46c0e430e4a116b133d0497baa2ffd7 /googletest | |
parent | 1c2f1907047216654599b0057df49d21a2c1400a (diff) | |
download | googletest-90244a6aef73d28b7d300c5b3e9d7c94bd6f437a.zip googletest-90244a6aef73d28b7d300c5b3e9d7c94bd6f437a.tar.gz googletest-90244a6aef73d28b7d300c5b3e9d7c94bd6f437a.tar.bz2 |
Fix testing::Combine on MSVC 2017.
On platforms with std::tuple and not std::tr1::tuple, GTEST_HAS_COMBINE
gets turned off when it works fine (due to GTEST_TUPLE_NAMESPACE_).
Elsewhere in the project, several GTEST_HAS_TR1_TUPLE checks
additionally check GTEST_HAS_STD_TUPLE_, so use that formulation.
(The ones that don't are specific to std::tr1::tuple and are followed by
an identical GTEST_HAS_STD_TUPLE_ version underneath it.)
In particular, this fixes testing::Combine on MSVC 2017, which regressed
here:
https://github.com/google/googletest/pull/1348#issuecomment-353879010
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 5d1b141..8778bdd 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -827,7 +827,7 @@ using ::std::tuple_size; // Determines whether to support Combine(). // The implementation doesn't work on Sun Studio since it doesn't // understand templated conversion operators. -#if GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) +#if (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC) # define GTEST_HAS_COMBINE 1 #endif |