From 13d477be5d5549b97d333ef59e98f30076959599 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 6 Jan 2019 11:29:49 +0000 Subject: [PATCH] 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