From 4aa05bd4ffb8148787bbcaa8780c9c522eb61b13 Mon Sep 17 00:00:00 2001
From: Carlos O'Ryan <coryan@google.com>
Date: Wed, 6 Dec 2017 15:33:27 -0500
Subject: [PATCH 1/4] Only switch to g++-4.9 on Linux.

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 68acbd36..797c2898 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@
 
 install:
 # /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
-- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
+- if [ "$CXX" = "g++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
 # /usr/bin/clang is 3.4, lets override with modern one.
 - if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; ln -sf /usr/bin/ccache /$HOME/bin/$CXX; ln -sf /usr/bin/ccache /$HOME/bin/$CC; fi
 # ccache on OS X needs installation first

From 8d9d6bb0a3751ef3a7159aa0c2f1efd769d56075 Mon Sep 17 00:00:00 2001
From: Wojciech Mamrak <wmamrak@gmail.com>
Date: Thu, 7 Dec 2017 18:17:43 +0100
Subject: [PATCH 2/4] Improved description of VS std::tuple support

---
 googletest/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
index b9a920b7..31fef2cd 100644
--- a/googletest/CMakeLists.txt
+++ b/googletest/CMakeLists.txt
@@ -83,6 +83,8 @@ include_directories(
 # <= VS 2010  <= 10        <= 1600         Use Google Tests's own tuple.
 # VS 2012     11           1700            std::tr1::tuple + _VARIADIC_MAX=10
 # VS 2013     12           1800            std::tr1::tuple
+# VS 2015     14           1900            std::tuple
+# VS 2017     15           >= 1910         std::tuple
 if (MSVC AND MSVC_VERSION EQUAL 1700)
   add_definitions(/D _VARIADIC_MAX=10)
 endif()

From 3464f76e890a7f130988ffa0196577487d582b76 Mon Sep 17 00:00:00 2001
From: Wojciech Mamrak <wmamrak@gmail.com>
Date: Thu, 7 Dec 2017 18:18:17 +0100
Subject: [PATCH 3/4] Improved description of VS std::tuple support

---
 googlemock/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index 724fdd5f..c474947e 100644
--- a/googlemock/CMakeLists.txt
+++ b/googlemock/CMakeLists.txt
@@ -74,6 +74,8 @@ include_directories("${gmock_SOURCE_DIR}/include"
 # <= VS 2010  <= 10        <= 1600         Use Google Tests's own tuple.
 # VS 2012     11           1700            std::tr1::tuple + _VARIADIC_MAX=10
 # VS 2013     12           1800            std::tr1::tuple
+# VS 2015     14           1900            std::tuple
+# VS 2017     15           >= 1910         std::tuple
 if (MSVC AND MSVC_VERSION EQUAL 1700)
   add_definitions(/D _VARIADIC_MAX=10)
 endif()

From 57bb0bbbf80b006f35a249951fe2e051221173ae Mon Sep 17 00:00:00 2001
From: Wojciech Mamrak <wmamrak@gmail.com>
Date: Thu, 7 Dec 2017 18:20:25 +0100
Subject: [PATCH 4/4] Remove C4996 warning in VS2017

---
 googletest/include/gtest/internal/gtest-port.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 0c360072..0a0cd1d7 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -642,6 +642,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
 // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
 #  define GTEST_HAS_TR1_TUPLE 0
+# elif defined(_MSC_VER) && (_MSC_VER >= 1910)
+// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.`
+#  define GTEST_HAS_TR1_TUPLE 0
 # else
 // The user didn't tell us not to do it, so we assume it's OK.
 #  define GTEST_HAS_TR1_TUPLE 1