From f8b1c1af17750189b83c58f360c85268c0d95105 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 28 Dec 2018 06:03:51 -0500 Subject: Googletest export Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941 --- .../include/gmock/internal/gmock-internal-utils.h | 29 +--------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h') diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 133fccef..3de3d545 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -92,16 +92,11 @@ inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) { template inline Element* GetRawPointer(Element* p) { return p; } -// Symbian compilation can be done with wchar_t being either a native -// type or a typedef. Using Google Mock with OpenC without wchar_t -// should require the definition of _STLP_NO_WCHAR_T. -// // MSVC treats wchar_t as a native type usually, but treats it as the // same as unsigned short when the compiler option /Zc:wchar_t- is // specified. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t // is a native type. -#if (GTEST_OS_SYMBIAN && defined(_STLP_NO_WCHAR_T)) || \ - (defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)) +#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED) // wchar_t is a typedef. #else # define GMOCK_WCHAR_T_IS_NATIVE_ 1 @@ -452,32 +447,10 @@ class StlContainerView { static const_reference ConstReference(const Element (&array)[N]) { // Ensures that Element is not a const type. testing::StaticAssertTypeEq(); -#if GTEST_OS_SYMBIAN - // The Nokia Symbian compiler confuses itself in template instantiation - // for this call without the cast to Element*: - // function call '[testing::internal::NativeArray].NativeArray( - // {lval} const char *[4], long, testing::internal::RelationToSource)' - // does not match - // 'testing::internal::NativeArray::NativeArray( - // char *const *, unsigned int, testing::internal::RelationToSource)' - // (instantiating: 'testing::internal::ContainsMatcherImpl - // ::Matches(const char * (&)[4]) const') - // (instantiating: 'testing::internal::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, - RelationToSourceReference()); -#else 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, RelationToSourceCopy()); -#else return type(array, N, RelationToSourceCopy()); -#endif // GTEST_OS_SYMBIAN } }; -- cgit v1.2.3