summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-09-13 14:36:51 (GMT)
committerGitHub <noreply@github.com>2018-09-13 14:36:51 (GMT)
commit792b475b9bd893dec0df22ba27f8e0cacf59ad65 (patch)
treee0ca772f88964725c6dfb915dbcab89c6bb68464
parent0c799d0436e1b6d867c1738f6ff58166d153cacc (diff)
parente1d41f3f9f3d8c1b6987ce849120677c380e7f87 (diff)
downloadgoogletest-792b475b9bd893dec0df22ba27f8e0cacf59ad65.zip
googletest-792b475b9bd893dec0df22ba27f8e0cacf59ad65.tar.gz
googletest-792b475b9bd893dec0df22ba27f8e0cacf59ad65.tar.bz2
Merge pull request #1817 from DavidSchuldenfrei/1.8.x/bugFix/CompileVS2013
Fix Compile error, and warning in Visaul Studio 2013
-rw-r--r--googlemock/include/gmock/gmock-matchers.h8
-rw-r--r--googletest/include/gtest/gtest-printers.h4
2 files changed, 11 insertions, 1 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index a7bcfc8..41d7252 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -56,11 +56,17 @@
# include <initializer_list> // NOLINT -- must be after gtest.h
#endif
+#if _MSC_VER >= 1900
GTEST_DISABLE_MSC_WARNINGS_PUSH_(
4251 5046 /* class A needs to have dll-interface to be used by clients of
class B */
/* Symbol involving type with internal linkage not defined */)
-
+#else //Pragma 5046 doesn't exist in version of MSC prior to 1900
+GTEST_DISABLE_MSC_WARNINGS_PUSH_(
+ 4251 /* class A needs to have dll-interface to be used by clients of
+ class B */
+ /* Symbol involving type with internal linkage not defined */)
+#endif
namespace testing {
// To implement a matcher Foo for type T, define:
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index 51865f8..71f2aae 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -983,7 +983,11 @@ struct TuplePolicy {
template <size_t I>
static typename AddReference<const typename ::std::tr1::tuple_element<
+#if defined(_MSC_VER) && _MSC_VER < 1900
+ I, Tuple>::type>::type
+#else
static_cast<int>(I), Tuple>::type>::type
+#endif
get(const Tuple& tuple) {
return ::std::tr1::get<I>(tuple);
}