Move FMT_USE_RTTI to ostream.h

Only ostream.h and std.h use it, and std.h includes ostream.h.
This commit is contained in:
Victor Zverovich 2026-11-08 07:23:41 -08:00
parent 41f2838233
commit ded661bf35
2 changed files with 11 additions and 11 deletions

View File

@ -97,17 +97,6 @@
# define FMT_INLINE_VARIABLE
#endif
// Check if RTTI is disabled.
#ifdef FMT_USE_RTTI
// Use the provided definition.
#elif defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || defined(_CPPRTTI) || \
defined(__INTEL_RTTI__) || defined(__RTTI)
// __RTTI is for EDG compilers. _CPPRTTI is for MSVC.
# define FMT_USE_RTTI 1
#else
# define FMT_USE_RTTI 0
#endif
// Visibility when compiled as a shared library/object.
#if defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
# define FMT_SO_VISIBILITY(value) FMT_VISIBILITY(value)

View File

@ -30,6 +30,17 @@
# define FMT_MSVC_STL_UPDATE 0
#endif
// Check if RTTI is disabled.
#ifdef FMT_USE_RTTI
// Use the provided definition.
#elif defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || defined(_CPPRTTI) || \
defined(__INTEL_RTTI__) || defined(__RTTI)
// __RTTI is for EDG compilers. _CPPRTTI is for MSVC.
# define FMT_USE_RTTI 1
#else
# define FMT_USE_RTTI 0
#endif
FMT_BEGIN_NAMESPACE
namespace detail {