Push several shanges:
Make single argument constructors explicit in macros.
Remove NOMINMAX macro.
Add macros for disabling Microsoft Visual C++ warnings.
Add WhenDynamicCastTo<T> matcher.
A matcher that matches a pointer that matches inner_matcher when
dynamic_cast<T> 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/
diff --git a/include/gmock/internal/gmock-internal-utils.h b/include/gmock/internal/gmock-internal-utils.h
index 6110dd7..e2ddb05 100644
--- a/include/gmock/internal/gmock-internal-utils.h
+++ b/include/gmock/internal/gmock-internal-utils.h
@@ -447,16 +447,17 @@
// 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<Element*>(&array[0]), N, kReference);
+ return type(const_cast<Element*>(&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<Element*>(&array[0]), N, kCopy);
+ return type(const_cast<Element*>(&array[0]), N, RelationToSourceCopy());
#else
- return type(array, N, kCopy);
+ return type(array, N, RelationToSourceCopy());
#endif // GTEST_OS_SYMBIAN
}
};
@@ -473,10 +474,10 @@
static const_reference ConstReference(
const ::testing::tuple<ElementPointer, Size>& 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<ElementPointer, Size>& array) {
- return type(get<0>(array), get<1>(array), kCopy);
+ return type(get<0>(array), get<1>(array), RelationToSourceCopy());
}
};
@@ -507,3 +508,4 @@
} // namespace testing
#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
+