From acb536a67ea341efb12cc9810793a7b1010c8185 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 16 Nov 2018 02:06:10 +0200 Subject: [PATCH] Fix compile_time_type_info for clang-cl --- include/boost/type_index/detail/compile_time_type_info.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/type_index/detail/compile_time_type_info.hpp b/include/boost/type_index/detail/compile_time_type_info.hpp index 53eca33..93ac1f5 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -38,10 +38,10 @@ #elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING) # include BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING ) -#elif defined(_MSC_VER) && defined (BOOST_NO_CXX11_NOEXCEPT) +#elif defined(_MSC_VER) && !defined(__clang__) && defined (BOOST_NO_CXX11_NOEXCEPT) // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1 BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "") -#elif defined(_MSC_VER) && !defined (BOOST_NO_CXX11_NOEXCEPT) +#elif defined(_MSC_VER) && !defined(__clang__) && !defined (BOOST_NO_CXX11_NOEXCEPT) // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1 BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "") #elif defined(__clang__) && defined(__APPLE__) @@ -284,7 +284,8 @@ struct ctti { || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \ || (defined(__ICC) && (__ICC >= 600)) \ || defined(__ghs__) \ - || defined(__DMC__) + || defined(__DMC__) \ + || defined(__clang__) return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__); #else boost::typeindex::detail::failed_to_get_function_name();