From e8f9424ec59655f2ef84144d61514f7eaa3dc966 Mon Sep 17 00:00:00 2001 From: Michel Morin Date: Sat, 19 May 2012 12:20:31 +0000 Subject: [PATCH] Fix clang's config: * `typeid` is useless when `-fno-rtti` is turned on. * Protect `BOOST_NO_RTTI` and `BOOST_NO_TYPEID` from redefinition, as done for `BOOST_NO_EXCEPTIONS`. [SVN r78510] --- include/boost/config/compiler/clang.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 976a92c0..1067a800 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -12,10 +12,14 @@ # define BOOST_NO_EXCEPTIONS #endif -#if !__has_feature(cxx_rtti) +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + #if defined(__int64) # define BOOST_HAS_MS_INT64 #endif