Commit 74b44b2d by Abseil Team Committed by Andy Getz

Googletest export

Disable warning C4800 for Visual Studio 2019. The compiler warning C4800 is disabled by default in Visual Studio 2019, but it can be enabled on the command line. The only version of Visual Studio that does not support warning C4800 is Visual Studio 2017. PiperOrigin-RevId: 292624510
parent 572e261b
...@@ -279,7 +279,11 @@ class GTEST_API_ AssertionResult { ...@@ -279,7 +279,11 @@ class GTEST_API_ AssertionResult {
// Used in EXPECT_TRUE/FALSE(assertion_result). // Used in EXPECT_TRUE/FALSE(assertion_result).
AssertionResult(const AssertionResult& other); AssertionResult(const AssertionResult& other);
#if defined(_MSC_VER) && _MSC_VER < 1910 // C4800 is a level 3 warning in Visual Studio 2015 and earlier.
// This warning is not emitted in Visual Studio 2017.
// This warning is off by default starting in Visual Studio 2019 but can be
// enabled with command-line options.
#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */) GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */)
#endif #endif
...@@ -299,7 +303,7 @@ class GTEST_API_ AssertionResult { ...@@ -299,7 +303,7 @@ class GTEST_API_ AssertionResult {
= nullptr) = nullptr)
: success_(success) {} : success_(success) {}
#if defined(_MSC_VER) && _MSC_VER < 1910 #if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
GTEST_DISABLE_MSC_WARNINGS_POP_() GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment