diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-23 15:58:37 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-23 15:58:37 +0000 |
commit | e9f093ae15ac232f7ac0a31d64a5873fd1e306c6 (patch) | |
tree | 1aa3c6d96830284e889a345c8f0a1bf2b8fe1f7e /include/gtest/internal/gtest-param-util.h | |
parent | 75e2713e451b8d51fc185957383f0ea97a40ef15 (diff) | |
download | googletest-e9f093ae15ac232f7ac0a31d64a5873fd1e306c6.tar.gz googletest-e9f093ae15ac232f7ac0a31d64a5873fd1e306c6.tar.bz2 googletest-e9f093ae15ac232f7ac0a31d64a5873fd1e306c6.zip |
Makes gtest work with Sun Studio. Patch submitted by Hady Zalek.
Diffstat (limited to 'include/gtest/internal/gtest-param-util.h')
-rw-r--r-- | include/gtest/internal/gtest-param-util.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/gtest/internal/gtest-param-util.h b/include/gtest/internal/gtest-param-util.h index f84bc02d..0cbb58c2 100644 --- a/include/gtest/internal/gtest-param-util.h +++ b/include/gtest/internal/gtest-param-util.h @@ -47,10 +47,6 @@ #if GTEST_HAS_PARAM_TEST -#if GTEST_HAS_RTTI -#include <typeinfo> // NOLINT -#endif // GTEST_HAS_RTTI - namespace testing { namespace internal { @@ -63,24 +59,6 @@ namespace internal { GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name, const char* file, int line); -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Downcasts the pointer of type Base to Derived. -// Derived must be a subclass of Base. The parameter MUST -// point to a class of type Derived, not any subclass of it. -// When RTTI is available, the function performs a runtime -// check to enforce this. -template <class Derived, class Base> -Derived* CheckedDowncastToActualType(Base* base) { -#if GTEST_HAS_RTTI - GTEST_CHECK_(typeid(*base) == typeid(Derived)); - Derived* derived = dynamic_cast<Derived*>(base); // NOLINT -#else - Derived* derived = static_cast<Derived*>(base); // Poor man's downcast. -#endif // GTEST_HAS_RTTI - return derived; -} - template <typename> class ParamGeneratorInterface; template <typename> class ParamGenerator; |