From fb6293c5d7786bd2b08a39bf1ed6e6f3fa22ff38 Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Sun, 21 Jan 2024 15:28:22 +0100 Subject: [PATCH] Don't always enable typeid usage under msvc (#3821) --- 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