From ecac9ac83cc3e6175dc0128b23a37e8cbe2c5ce3 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Wed, 7 May 2014 16:46:07 +0400 Subject: [PATCH] Tune CTTI for different versions of Clang --- include/boost/type_index/detail/compile_time_type_info.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 8fb40af..44c536c 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -103,11 +103,13 @@ #elif defined(_MSC_VER) // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1 BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, ""); -#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)) +#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0)) // sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1 + // note: checked on 3.0 BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, ""); -#elif defined(__clang__) && __clang_major__ == 3 && __clang_minor__ >= 4 +#elif defined(__clang__) && __clang_major__ == 3 && __clang_minor__ > 0 // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int" + // note: checked on 3.1, 3.4 BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = "); #elif defined(__GNUC__) // sizeof("static const char* boost::detail::ctti::n() [with T = ") - 1, sizeof("]") - 1