Update checks for dynamic_cast usage when compiled with no rtti (#3963)
* Rename FMT_USE_TYPEID to FMT_HAS_RTTI and use it as check to enable dynamic_cast usage * FMT_HAS_RTTI->FMT_USE_RTTI
This commit is contained in:
@@ -279,6 +279,17 @@ import std;
|
||||
# define FMT_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Check if rtti is available.
|
||||
#ifndef FMT_USE_RTTI
|
||||
// __RTTI is for EDG compilers. _CPPRTTI is for MSVC.
|
||||
# if defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || defined(_CPPRTTI) || \
|
||||
defined(__INTEL_RTTI__) || defined(__RTTI)
|
||||
# define FMT_USE_RTTI 1
|
||||
# else
|
||||
# define FMT_USE_RTTI 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define FMT_FWD(...) static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
|
||||
|
||||
// Enable minimal optimizations for more compact code in debug mode.
|
||||
|
||||
Reference in New Issue
Block a user