diff --git a/source/mijin/detect.hpp b/source/mijin/detect.hpp index cc38e80..a856f97 100644 --- a/source/mijin/detect.hpp +++ b/source/mijin/detect.hpp @@ -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 //