We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 361c8fb commit 69c199dCopy full SHA for 69c199d
include/gtest/internal/gtest-port.h
@@ -391,6 +391,13 @@
391
# define GTEST_HAS_RTTI 0
392
# endif // __GXX_RTTI
393
394
+// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends
395
+// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the
396
+// first version with C++ support.
397
+# elif defined(__clang__)
398
+
399
+# define GTEST_HAS_RTTI __has_feature(cxx_rtti)
400
401
// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
402
// both the typeid and dynamic_cast features are present.
403
# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
0 commit comments