Added MIJIN_RTTI macro for detecting if RTTI is available.
This commit is contained in:
parent
e91184ec82
commit
b44d6feb97
@ -61,6 +61,26 @@ namespace mijin
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(MIJIN_RTTI)
|
||||
#if MIJIN_COMPILER == MIJIN_COMPILER_GCC
|
||||
#if defined(__GXX_RTTI)
|
||||
#define MIJIN_RTTI 1
|
||||
#else
|
||||
#define MIJIN_RTTI 0
|
||||
#endif
|
||||
#elif MIJIN_COMPILER == MIJIN_COMPILER_CLANG
|
||||
#define MIJIN_RTTI (__has_feature(cxx_rtti))
|
||||
#elif MIJIN_COMPILER == MIJIN_COMPILER_MSVC
|
||||
#if defined(_CPPRTTI)
|
||||
#define MIJIN_RTTI 1
|
||||
#else
|
||||
#define MIJIN_RTTI 0
|
||||
#endif
|
||||
#else
|
||||
#define MIJIN_RTTI 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// public constants
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user