diff --git a/.travis.yml b/.travis.yml index 4dd7d06..9cac6ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,30 +223,43 @@ 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 + + - 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.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 + - 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 .. diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index dd4ec4c..00970f2 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -86,6 +86,13 @@ # 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 +# 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 32c6c56..d7dbcc2 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 @@ -307,7 +307,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) && !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 5aa0e3d..22ccd02 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) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) #undef BOOST_TT_NOEXCEPT_DECL #define BOOST_TT_NOEXCEPT_DECL noexcept diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index 8e6c9a0..521de59 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); @@ -144,7 +144,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 44dccf2..c26870b 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); @@ -87,7 +87,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