From 90244a6aef73d28b7d300c5b3e9d7c94bd6f437a Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 2 Jan 2018 12:55:44 -0500 Subject: [PATCH] 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 --- googletest/include/gtest/internal/gtest-port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 5d1b141d..8778bddd 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