summaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-07 20:45:16 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-07 20:45:16 (GMT)
commit44bafcb62d0f33fbc9aafb5492b245c949850df8 (patch)
treec5e5ca98647e5fe261104e21c07e8beb02d300ff /include/gtest/internal/gtest-internal.h
parent891b3716c4b6e4bd7fdbd642ecaab37776eb5935 (diff)
downloadgoogletest-44bafcb62d0f33fbc9aafb5492b245c949850df8.zip
googletest-44bafcb62d0f33fbc9aafb5492b245c949850df8.tar.gz
googletest-44bafcb62d0f33fbc9aafb5492b245c949850df8.tar.bz2
Fixes the "passing non-POD to ellipsis" warning in Sun Studio. Based on Alexander Demin's patch.
Diffstat (limited to 'include/gtest/internal/gtest-internal.h')
-rw-r--r--include/gtest/internal/gtest-internal.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h
index 43e5f97..e9f8e7c 100644
--- a/include/gtest/internal/gtest-internal.h
+++ b/include/gtest/internal/gtest-internal.h
@@ -148,17 +148,14 @@ char (&IsNullLiteralHelper(...))[2]; // NOLINT
// A compile-time bool constant that is true if and only if x is a
// null pointer literal (i.e. NULL or any 0-valued compile-time
// integral constant).
-#ifdef GTEST_ELLIPSIS_NEEDS_COPY_
-// Passing non-POD classes through ellipsis (...) crashes the ARM
-// compiler. The Nokia Symbian and the IBM XL C/C++ compiler try to
-// instantiate a copy constructor for objects passed through ellipsis
-// (...), failing for uncopyable objects. Hence we define this to
-// false (and lose support for NULL detection).
+#ifdef GTEST_ELLIPSIS_NEEDS_POD_
+// We lose support for NULL detection where the compiler doesn't like
+// passing non-POD classes through ellipsis (...).
#define GTEST_IS_NULL_LITERAL_(x) false
#else
#define GTEST_IS_NULL_LITERAL_(x) \
(sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
-#endif // GTEST_ELLIPSIS_NEEDS_COPY_
+#endif // GTEST_ELLIPSIS_NEEDS_POD_
// Appends the user-supplied message to the Google-Test-generated message.
String AppendUserMessage(const String& gtest_msg,