diff options
Diffstat (limited to 'include/gtest/internal/gtest-type-util.h')
-rw-r--r-- | include/gtest/internal/gtest-type-util.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/gtest/internal/gtest-type-util.h b/include/gtest/internal/gtest-type-util.h index 1ea7d18e..f1b1bedd 100644 --- a/include/gtest/internal/gtest-type-util.h +++ b/include/gtest/internal/gtest-type-util.h @@ -47,9 +47,11 @@ #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P -#ifdef __GNUC__ +// #ifdef __GNUC__ is too general here. It is possible to use gcc without using +// libstdc++ (which is where cxxabi.h comes from). +#ifdef __GLIBCXX__ #include <cxxabi.h> -#endif // __GNUC__ +#endif // __GLIBCXX__ #include <typeinfo> @@ -74,7 +76,7 @@ String GetTypeName() { #if GTEST_HAS_RTTI const char* const name = typeid(T).name(); -#ifdef __GNUC__ +#ifdef __GLIBCXX__ int status = 0; // gcc's implementation of typeid(T).name() mangles the type name, // so we have to demangle it. @@ -84,7 +86,7 @@ String GetTypeName() { return name_str; #else return name; -#endif // __GNUC__ +#endif // __GLIBCXX__ #else return "<type>"; |