From 518e0519ca49c3a6504d1e377c5a467434d5f719 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Wed, 1 Mar 2017 16:44:47 -0800 Subject: Minimal changes to fix build failures on Microsoft Visual Studio 2015 Fixes the following errors: hash_map(17): error C2338: is deprecated and will be REMOVED. Please use . You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj] hash_set(17): error C2338: is deprecated and will be REMOVED. Please use . You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj] googletest\test\gtest_catch_exceptions_test_.cc(152): error C2220: warning treated as error - no 'object' file generated googletest\test\gtest_catch_exceptions_test_.cc(152): warning C4297: 'CxxExceptionInDestructorTest::~CxxExceptionInDestructorTest': function assumed not to throw an exception but does googletest\test\gtest_catch_exceptions_test_.cc(152): note: destructor or deallocator has a (possibly implicit) non-throwing exception specification There were already some checks for _MSC_VER in the code, so this commit continues in that vein. --- googletest/test/gtest-printers_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'googletest/test/gtest-printers_test.cc') diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/gtest-printers_test.cc index af69f282..107b10f6 100644 --- a/googletest/test/gtest-printers_test.cc +++ b/googletest/test/gtest-printers_test.cc @@ -216,6 +216,7 @@ using ::testing::internal::UniversalTersePrintTupleFieldsToStrings; #endif using ::testing::internal::string; +#if GTEST_HAS_HASH_MAP_ // The hash_* classes are not part of the C++ standard. STLport // defines them in namespace std. MSVC defines them in ::stdext. GCC // defines them in ::. @@ -230,6 +231,7 @@ using ::stdext::hash_set; using ::stdext::hash_multimap; using ::stdext::hash_multiset; #endif +#endif // Prints a value to a string using the universal value printer. This // is a helper for testing UniversalPrinter::Print() for various types. -- cgit v1.2.3