From cafc27e2b660337cf587eb6fb3f1d8a793322bf5 Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sat, 20 Jan 2024 17:51:13 +0100 Subject: [PATCH] Don't always enable typeid usage under msvc --- include/fmt/std.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index d34ab789ba44..5cb1ca48d874 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -54,8 +54,8 @@ // Check if typeid is available. #ifndef FMT_USE_TYPEID -// __RTTI is for EDG compilers. In MSVC typeid is available without RTTI. -# if defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || FMT_MSC_VERSION || \ +// __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_TYPEID 1 # else