diff options
author | Abseil Team <absl-team@google.com> | 2020-01-31 18:06:10 -0500 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2020-02-07 13:34:51 -0500 |
commit | 74b44b2d0fc201f4b6afdac37e9a32f4352a3dee (patch) | |
tree | 563e92fb49a27e90b2c2578c51e6f597fc910e53 | |
parent | 572e261b607585d7044ad3321f9530d5c14a2564 (diff) | |
download | googletest-74b44b2d0fc201f4b6afdac37e9a32f4352a3dee.tar.gz 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
-rw-r--r-- | googletest/include/gtest/gtest.h | 8 |
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 |