From 90db5bb63146104846ca77003ce52fd66339f755 Mon Sep 17 00:00:00 2001 From: Orvid King Date: Tue, 28 Jul 2015 14:09:55 -0700 Subject: [PATCH] Add detection of MSVC RTTI Summary: This adds MSVC support to the detection of FOLLY_HAS_RTTI. Closes #255 Reviewed By: @yfeldblum Differential Revision: D2283036 Pulled By: @sgolemon --- folly/Portability.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/folly/Portability.h b/folly/Portability.h index 40a62603..0e8e1108 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -280,7 +280,8 @@ inline size_t malloc_usable_size(void* ptr) { #endif // RTTI may not be enabled for this compilation unit. -#if defined(__GXX_RTTI) || defined(__cpp_rtti) +#if defined(__GXX_RTTI) || defined(__cpp_rtti) || \ + (defined(_MSC_VER) && defined(_CPPRTTI)) # define FOLLY_HAS_RTTI 1 #endif -- 2.34.1