From 1f5fdea417f1a55cffcfc0711d345d1d8ca2bc01 Mon Sep 17 00:00:00 2001 From: billydonahue Date: Mon, 19 May 2014 17:54:51 +0000 Subject: Push several shanges: Make single argument constructors explicit in macros. Remove NOMINMAX macro. Add macros for disabling Microsoft Visual C++ warnings. Add WhenDynamicCastTo matcher. A matcher that matches a pointer that matches inner_matcher when dynamic_cast is applied. Add IWYU export pragmas to the tuple include lines. Fix NativeArray to not require a copy constructor unless we ask for one. This allows ElementsAre() to support non-copyable types. Examine WINAPI_FAMILY_PARTITION macros to better distinguish windows platforms. Author: martin@martin.st From: https://codereview.appspot.com/57220043/ --- include/gmock/internal/gmock-internal-utils.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include/gmock/internal/gmock-internal-utils.h') diff --git a/include/gmock/internal/gmock-internal-utils.h b/include/gmock/internal/gmock-internal-utils.h index 6110dd7b..e2ddb05c 100644 --- a/include/gmock/internal/gmock-internal-utils.h +++ b/include/gmock/internal/gmock-internal-utils.h @@ -447,16 +447,17 @@ class StlContainerView { // ConstReference(const char * (&)[4])') // (and though the N parameter type is mismatched in the above explicit // conversion of it doesn't help - only the conversion of the array). - return type(const_cast(&array[0]), N, kReference); + return type(const_cast(&array[0]), N, + RelationToSourceReference()); #else - return type(array, N, kReference); + return type(array, N, RelationToSourceReference()); #endif // GTEST_OS_SYMBIAN } static type Copy(const Element (&array)[N]) { #if GTEST_OS_SYMBIAN - return type(const_cast(&array[0]), N, kCopy); + return type(const_cast(&array[0]), N, RelationToSourceCopy()); #else - return type(array, N, kCopy); + return type(array, N, RelationToSourceCopy()); #endif // GTEST_OS_SYMBIAN } }; @@ -473,10 +474,10 @@ class StlContainerView< ::testing::tuple > { static const_reference ConstReference( const ::testing::tuple& array) { - return type(get<0>(array), get<1>(array), kReference); + return type(get<0>(array), get<1>(array), RelationToSourceReference()); } static type Copy(const ::testing::tuple& array) { - return type(get<0>(array), get<1>(array), kCopy); + return type(get<0>(array), get<1>(array), RelationToSourceCopy()); } }; @@ -507,3 +508,4 @@ struct BooleanConstant {}; } // namespace testing #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ + -- cgit v1.2.3