From a60e25a74db6dbd2eb03a113dcf1c5c488f13599 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Wed, 14 Nov 2018 09:09:37 +0300 Subject: [PATCH 1/4] Better diagnostics for missing PRETTY_FUNCTION macro (refs #24) --- include/boost/type_index/detail/compile_time_type_info.hpp | 4 ++-- 1 file changed, 2 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 7a55350..53eca33 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -257,7 +257,7 @@ struct ctti { || defined(__DMC__) constexpr unsigned int size = sizeof(__PRETTY_FUNCTION__); #else - boost::typeindex::detail::failed_to_get_function_name(); + boost::typeindex::detail::failed_to_get_function_name(); #endif boost::typeindex::detail::assert_compile_time_legths< @@ -287,7 +287,7 @@ struct ctti { || defined(__DMC__) return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__); #else - boost::typeindex::detail::failed_to_get_function_name(); + boost::typeindex::detail::failed_to_get_function_name(); return ""; #endif } From 075b3682ae523ac24721f984975194a8335ba420 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Thu, 15 Nov 2018 21:58:17 +0300 Subject: [PATCH 2/4] Disable constexpr sort test for MSVC <= 1914 (refs #24) --- examples/constexpr14_sort_check.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/constexpr14_sort_check.cpp b/examples/constexpr14_sort_check.cpp index 54a8435..2f5f4a3 100644 --- a/examples/constexpr14_sort_check.cpp +++ b/examples/constexpr14_sort_check.cpp @@ -1,4 +1,4 @@ -// Copyright 2013-2017 Antony Polukhin +// Copyright 2013-2018 Antony Polukhin // Distributed under the Boost Software License, Version 1.0. // (See the accompanying file LICENSE_1_0.txt @@ -6,7 +6,7 @@ #include -#if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1914)) //[type_index_constexpr14_sort_check_example /*` @@ -68,7 +68,7 @@ int main() { } //] [/type_index_constexpr14_sort_check_example] -#else // #if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#else // #if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1914)) int main() {} From 7654c26594e7af41d22351e1e5564b1a82717711 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 16 Nov 2018 01:58:18 +0300 Subject: [PATCH 3/4] Increase MSVC requirements for constexpr sorted test (refs #24) --- examples/constexpr14_sort_check.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/constexpr14_sort_check.cpp b/examples/constexpr14_sort_check.cpp index 2f5f4a3..3c676b2 100644 --- a/examples/constexpr14_sort_check.cpp +++ b/examples/constexpr14_sort_check.cpp @@ -6,7 +6,7 @@ #include -#if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1914)) +#if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1916)) //[type_index_constexpr14_sort_check_example /*` @@ -68,7 +68,7 @@ int main() { } //] [/type_index_constexpr14_sort_check_example] -#else // #if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1914)) +#else // #if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(_MSC_VER) || (_MSC_VER > 1916)) int main() {} From acb536a67ea341efb12cc9810793a7b1010c8185 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 16 Nov 2018 02:06:10 +0200 Subject: [PATCH 4/4] 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();