diff --git a/.travis.yml b/.travis.yml index 9cac6ec..d7e2f8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ os: - linux - osx +dist : xenial + branches: only: - master @@ -33,6 +35,7 @@ matrix: - os: linux compiler: g++-4.4 env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x + dist: trusty addons: apt: packages: @@ -43,6 +46,7 @@ matrix: - os: linux compiler: g++-4.6 env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x + dist: trusty addons: apt: packages: @@ -52,6 +56,7 @@ matrix: - os: linux env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 + dist: trusty addons: apt: packages: @@ -70,6 +75,7 @@ matrix: - os: linux env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 + dist: trusty addons: apt: packages: @@ -153,26 +159,29 @@ matrix: - os: linux env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11 + dist: trusty addons: apt: packages: - clang-3.5 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.5 + - llvm-toolchain-trusty-3.5 - os: linux env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11 + dist: trusty addons: apt: packages: - clang-3.6 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.6 + - llvm-toolchain-trusty-3.6 - os: linux - env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11 + dist: trusty + env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z addons: apt: packages: @@ -183,23 +192,25 @@ matrix: - os: linux env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z + dist: trusty addons: apt: packages: - clang-3.8 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.8 + - llvm-toolchain-trusty-3.8 - os: linux env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z + dist: trusty addons: apt: packages: - clang-3.9 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.9 + - llvm-toolchain-trusty-3.9 - os: linux compiler: clang++-4.0 @@ -210,7 +221,7 @@ matrix: - clang-4.0 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-4.0 + - llvm-toolchain-xenial-4.0 - os: linux compiler: clang++-5.0 @@ -221,7 +232,7 @@ matrix: - clang-5.0 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-5.0 + - llvm-toolchain-xenial-5.0 - os: linux compiler: clang++-6.0 @@ -232,7 +243,18 @@ matrix: - clang-6.0 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-6.0 + - llvm-toolchain-xenial-6.0 + + - os: linux + compiler: clang++-7 + env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-7 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-7 - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z diff --git a/appveyor.yml b/appveyor.yml index 689fdd8..b1c14b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,9 +38,9 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-clr asynch-exceptions=on + ARGS: --toolset=msvc-14.1 cxxstd=17 address-model=64 cxxflags=-clr asynch-exceptions=on - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=32 cxxflags=-clr asynch-exceptions=on + ARGS: --toolset=msvc-14.1 cxxstd=17 address-model=32 cxxflags=-clr asynch-exceptions=on - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARGS: --toolset=msvc-14.1 architecture=arm testing.execute=off DISABLE_CONFIG_INFO: "YES" diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 00970f2..7c4b4f2 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -93,6 +93,20 @@ # define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE #endif +// +// If we have the SD6 macros (check for C++11's __cpp_rvalue_references), and we don't have __cpp_noexcept_function_type +// set, then don't treat noexcept functions as seperate types. This is a fix for msvc with the /Zc:noexceptTypes- flag set. +// +#if defined(__cpp_rvalue_references) && !defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif +// +// Check MSVC specific macro on older msvc compilers that don't support the SD6 macros, we don't rely on this +// if the SD6 macros *are* available as it appears to be undocumented. +// +#if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED) +# 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 432af4e..4de74a7 100644 --- a/include/boost/type_traits/detail/is_function_cxx_11.hpp +++ b/include/boost/type_traits/detail/is_function_cxx_11.hpp @@ -376,7 +376,7 @@ namespace boost { template struct is_function : public true_type {}; -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) #ifdef __CLR_VER template struct is_function : public true_type {}; @@ -384,9 +384,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -399,9 +401,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -414,9 +418,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -429,9 +435,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -445,9 +453,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -460,9 +470,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -475,9 +487,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -490,9 +504,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -506,9 +522,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -521,9 +539,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -536,9 +556,11 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; @@ -551,15 +573,17 @@ namespace boost { #ifndef _M_AMD64 template struct is_function : public true_type {}; +#ifndef __CLR_VER template struct is_function : public true_type {}; #endif +#endif #if !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) template struct is_function : public true_type {}; #endif -#endif // _MSC_VER +#endif // defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) #endif 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 d88a004..b0502cb 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 @@ -419,7 +419,7 @@ namespace boost { template struct is_member_function_pointer : public true_type {}; -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) #ifdef __CLR_VER template struct is_member_function_pointer : public true_type {}; diff --git a/meta/explicit-failures-markup.xml b/meta/explicit-failures-markup.xml new file mode 100644 index 0000000..e73de51 --- /dev/null +++ b/meta/explicit-failures-markup.xml @@ -0,0 +1,238 @@ + + + + + + + + + Type Traits tests are run with warnings-as-errors and GCC 3.x emits warnings with this test + that I haven't been able to suppress. + + + + + + + + + Apparently the compiler can't cope with these - later versions are fine though. + Probably work-round-able if someone would care to look into these. + + + + + + + + + + + + + + + + + + + + This failure is caused by the lack of compiler support for class template + partial specialization. A limited subset of the tested functionality is + available on the compiler through a user-side workaround (see + + http://www.boost.org/libs/type_traits/index.html#transformations for + details). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See bug 99776 'enum UIntEnum { value = UINT_MAX } is promoted to int' + http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=22b0a6b7-120f-4ca0-9136-fa1b25b26efe + https://developercommunity.visualstudio.com/content/problem/490264/standard-violation-enum-underlying-type-cannot-rep.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This functionality is available only on compilers that implement C++ Core Language + Defect Report 337. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The Type Traits library is broken when used with Sunpro-5.3 and the + argument to the template is an array or function type. Most other argument types + do work as expected: in other words the functionality is limited + with this compiler, but not so much as to render the library unuseable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The Type Traits library is broken when used with Sunpro-5.8 and the + argument to the template is a function type. Most other argument types + do work as expected: in other words the functionality is limited + with this compiler, but not so much as to render the library unuseable. + + + + + + + This fails with an internal compiler error, + there is no workaround as yet. + + + + + + + + + + + + + + + Older versions of MWCW incorrectly align pointers to member functions + (they use 12-byte boundaries, rather than a power-of-2 boundary), + leading to alignment_of / aligned_storage + to fail with these types on this compiler. + + + + diff --git a/test/test.hpp b/test/test.hpp index 4d0eb32..864c695 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -208,6 +208,9 @@ typedef int (UDT::*mf8)(...); # elif defined(BOOST_INTEL) # pragma warning(push) # pragma warning(disable: 21) +# elif defined(BOOST_CLANG) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wignored-qualifiers" # endif // // This is intentional: @@ -228,6 +231,8 @@ typedef r_type cr_type; # elif defined(BOOST_INTEL) # pragma warning(pop) # pragma warning(disable: 985) // identifier truncated in debug information +# elif defined(BOOST_CLANG) +# pragma clang diagnostic pop # endif struct POD_UDT { int x; };