Fixes unused function warning on Mac, and fixes compatibility with newer GCC.

This commit is contained in:
zhanyong.wan
2013-02-28 23:52:42 +00:00
parent 6a036a5c8c
commit fc01f532a6
3 changed files with 6 additions and 6 deletions

View File

@@ -813,8 +813,8 @@ struct CompileAssert {
};
#define GTEST_COMPILE_ASSERT_(expr, msg) \
typedef ::testing::internal::CompileAssert<(bool(expr))> \
msg[bool(expr) ? 1 : -1]
typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
// Implementation details of GTEST_COMPILE_ASSERT_:
//