aboutsummaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-01-31 18:06:10 -0500
committerAndy Getz <durandal@google.com>2020-02-07 13:34:51 -0500
commit74b44b2d0fc201f4b6afdac37e9a32f4352a3dee (patch)
tree563e92fb49a27e90b2c2578c51e6f597fc910e53 /googletest
parent572e261b607585d7044ad3321f9530d5c14a2564 (diff)
downloadgoogletest-74b44b2d0fc201f4b6afdac37e9a32f4352a3dee.tar.gz
googletest-74b44b2d0fc201f4b6afdac37e9a32f4352a3dee.tar.bz2
googletest-74b44b2d0fc201f4b6afdac37e9a32f4352a3dee.zip
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
Diffstat (limited to 'googletest')
-rw-r--r--googletest/include/gtest/gtest.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 981dbd71..39cff08d 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -279,7 +279,11 @@ class GTEST_API_ AssertionResult {
// Used in EXPECT_TRUE/FALSE(assertion_result).
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 */)
#endif
@@ -299,7 +303,7 @@ class GTEST_API_ AssertionResult {
= nullptr)
: success_(success) {}
-#if defined(_MSC_VER) && _MSC_VER < 1910
+#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif