From 94e055c9ba7badb6f3aedcb767512b1a39a20081 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 6 Jan 2019 09:22:25 +0000 Subject: [PATCH 1/7] Travis: Update XCode versions. --- .travis.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4dd7d06..cbb13b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,30 +223,22 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-5.0 + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + osx_image: xcode10.1 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + osx_image: xcode9.4 + - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode8.3 - - os: osx - env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z - osx_image: xcode8.2 - - - os: osx - env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z - osx_image: xcode8.1 - - - os: osx - env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z - osx_image: xcode8.0 - - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode7.3 - - os: osx - env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z - osx_image: xcode6.4 - install: - cd .. From 9830bcb8a91b457d6cd846e22b031d91b4319bab Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 6 Jan 2019 10:36:36 +0000 Subject: [PATCH 2/7] Travis: Add Xcode 9.1. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index cbb13b7..77c581f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -230,6 +230,10 @@ matrix: - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode9.4 + # 9.1 fails some tests that pass on 9.4: + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + osx_image: xcode9.1 - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z From 13d477be5d5549b97d333ef59e98f30076959599 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 6 Jan 2019 11:29:49 +0000 Subject: [PATCH 3/7] Travis CI: Add more OS X testers, plus clang-6. Update configuration to handle more broken compilers that can't deduce noexcept parameters in template partial specializations. --- .travis.yml | 17 +++++++++++++++++ include/boost/type_traits/detail/config.hpp | 6 ++++++ .../type_traits/detail/is_function_cxx_11.hpp | 4 ++-- .../is_member_function_pointer_cxx_11.hpp | 4 ++-- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77c581f..9cac6ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,6 +223,17 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-5.0 + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-6.0 + - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode10.1 @@ -231,6 +242,12 @@ matrix: env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode9.4 # 9.1 fails some tests that pass on 9.4: + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + osx_image: xcode9.3 + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + osx_image: xcode9.2 - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z osx_image: xcode9.1 diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index dd4ec4c..01c001e 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -86,6 +86,12 @@ # define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION #endif +#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703) +# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM +#endif +#if defined(__APPLE_CC__) && defined(__clang_major__) && (__clang_major__ == 9) && (__clang_minor__ == 0) +# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM +#endif #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/is_function_cxx_11.hpp b/include/boost/type_traits/detail/is_function_cxx_11.hpp index 3202fb2..aa06881 100644 --- a/include/boost/type_traits/detail/is_function_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_function_cxx_11.hpp @@ -18,7 +18,7 @@ namespace boost { template struct is_function : public false_type {}; -#if defined(__cpp_noexcept_function_type) && !defined(_MSC_VER) +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) #define BOOST_TT_NOEXCEPT_PARAM , bool NE #define BOOST_TT_NOEXCEPT_DECL noexcept(NE) #else @@ -316,7 +316,7 @@ namespace boost { // All over again for msvc with noexcept: -#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) #undef BOOST_TT_NOEXCEPT_DECL #define BOOST_TT_NOEXCEPT_DECL noexcept diff --git a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp index 9515468..40ed369 100644 --- a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp @@ -31,7 +31,7 @@ namespace boost { template struct is_member_function_pointer : public is_member_function_pointer {}; -#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) // MSVC can't handle noexcept(b) as a deduced template parameter // so we will have to write everything out :( #define BOOST_TT_NOEXCEPT_PARAM @@ -350,7 +350,7 @@ namespace boost { #endif -#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) #undef BOOST_TT_NOEXCEPT_DECL #define BOOST_TT_NOEXCEPT_DECL noexcept From 941e29e0a65ae321d551e7c698101c39b3112abb Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 6 Jan 2019 17:04:15 +0000 Subject: [PATCH 4/7] Apple X Code doesn't support noexcept as a separate type in partial specializations. --- include/boost/type_traits/detail/config.hpp | 1 + include/boost/type_traits/detail/is_function_cxx_11.hpp | 2 +- .../type_traits/detail/is_member_function_pointer_cxx_11.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 01c001e..00970f2 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -91,6 +91,7 @@ #endif #if defined(__APPLE_CC__) && defined(__clang_major__) && (__clang_major__ == 9) && (__clang_minor__ == 0) # define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE #endif #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/is_function_cxx_11.hpp b/include/boost/type_traits/detail/is_function_cxx_11.hpp index aa06881..250c9aa 100644 --- a/include/boost/type_traits/detail/is_function_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_function_cxx_11.hpp @@ -316,7 +316,7 @@ namespace boost { // All over again for msvc with noexcept: -#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) #undef BOOST_TT_NOEXCEPT_DECL #define BOOST_TT_NOEXCEPT_DECL noexcept diff --git a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp index 40ed369..bbecc4b 100644 --- a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp @@ -31,7 +31,7 @@ namespace boost { template struct is_member_function_pointer : public is_member_function_pointer {}; -#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) // MSVC can't handle noexcept(b) as a deduced template parameter // so we will have to write everything out :( #define BOOST_TT_NOEXCEPT_PARAM From 649c585b9cffa704333f86eb53824db5d4df25b3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 7 Jan 2019 09:16:29 +0000 Subject: [PATCH 5/7] is_member_function_pointer_cxx_11.hpp: don't specialize on noexcept for clang/apple. --- .../type_traits/detail/is_member_function_pointer_cxx_11.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp index bbecc4b..d754109 100644 --- a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp @@ -350,7 +350,7 @@ namespace boost { #endif -#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) #undef BOOST_TT_NOEXCEPT_DECL #define BOOST_TT_NOEXCEPT_DECL noexcept From 38f9545757b8df0d63c67d7f04b867a057d11fe7 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 7 Jan 2019 13:37:11 +0000 Subject: [PATCH 6/7] is_member_function_pointer_cxx_11.hpp: and another attempt to get the clang OS X logic correct. --- .../type_traits/detail/is_member_function_pointer_cxx_11.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp index d754109..e6f5ce2 100644 --- a/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp @@ -31,7 +31,7 @@ namespace boost { template struct is_member_function_pointer : public is_member_function_pointer {}; -#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) // MSVC can't handle noexcept(b) as a deduced template parameter // so we will have to write everything out :( #define BOOST_TT_NOEXCEPT_PARAM From 55a3ee0a3d863ebdd96ac676b5e8a5fa99f6fb45 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 7 Jan 2019 18:30:22 +0000 Subject: [PATCH 7/7] clang/OSX: Disable untestable is_function/is_member_function bits. --- test/is_function_test.cpp | 4 +++- test/is_member_func_test.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index 80899db..d211340 100644 --- a/test/is_function_test.cpp +++ b/test/is_function_test.cpp @@ -56,7 +56,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); -#if __cpp_noexcept_function_type +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); @@ -102,7 +102,9 @@ test_cv_qual(&X::f); test_cv_qual(&X::fc); test_cv_qual(&X::fv); test_cv_qual(&X::fcv); +#ifndef BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE test_cv_qual(&X::noexcept_f); +#endif test_cv_qual(&X::ref_f); test_cv_qual(&X::rvalue_f); diff --git a/test/is_member_func_test.cpp b/test/is_member_func_test.cpp index c08f072..e7f7dad 100644 --- a/test/is_member_func_test.cpp +++ b/test/is_member_func_test.cpp @@ -53,7 +53,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, fal BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, false); -#if __cpp_noexcept_function_type +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, true); @@ -79,7 +79,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::valu #ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION test_tricky(&tricky_members::const_ref_proc); +#ifndef BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE test_tricky(&tricky_members::noexcept_proc); +#endif test_tricky(&tricky_members::rvalue_proc); #endif