Fixes GCC 4.6 warnings (patch by Jeffrey Yasskin).

This commit is contained in:
zhanyong.wan
2011-01-10 18:17:59 +00:00
parent afaefb0e30
commit 48b1315108
5 changed files with 49 additions and 25 deletions

View File

@@ -919,6 +919,13 @@ typedef char IsNotContainer;
template <class C>
IsNotContainer IsContainerTest(...) { return '\0'; }
// EnableIf<condition>::type is void when 'Cond' is true, and
// undefined when 'Cond' is false. To use SFINAE to make a function
// overload only apply when a particular expression is true, add
// "typename EnableIf<expression>::type* = 0" as the last parameter.
template<bool> struct EnableIf;
template<> struct EnableIf<true> { typedef void type; }; // NOLINT
// Utilities for native arrays.
// ArrayEq() compares two k-dimensional native arrays using the
@@ -1182,7 +1189,7 @@ class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
private:\
virtual void TestBody();\
static ::testing::TestInfo* const test_info_;\
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
};\