Suppress "Conditional expression is constant" warning on Visual Studio.

This commit is contained in:
kosak 2014-01-29 07:30:13 +00:00
parent b5c81098a8
commit fc4aa1d718
2 changed files with 4 additions and 0 deletions

View File

@ -900,7 +900,9 @@ template <typename T1, typename T2>
// pattern requires the user to use it directly.
ConcatImplActionP3<std::string, T1, T2>
Concat(const std::string& a, T1 b, T2 c) {
GTEST_INTENTIONAL_CONST_COND_PUSH_
if (true) {
GTEST_INTENTIONAL_CONST_COND_POP_
// This branch verifies that ConcatImpl() can be invoked without
// explicit template arguments.
return ConcatImpl(a, b, c);

View File

@ -250,7 +250,9 @@ TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
// Larger size => smaller size is not fine.
EXPECT_FALSE((LosslessArithmeticConvertible<double, float>::value));
GTEST_INTENTIONAL_CONST_COND_PUSH_
if (sizeof(double) == sizeof(long double)) { // NOLINT
GTEST_INTENTIONAL_CONST_COND_POP_
// In some implementations (e.g. MSVC), double and long double
// have the same size.
EXPECT_TRUE((LosslessArithmeticConvertible<long double, double>::value));