From e55946da6e0a782c8cf8f7aa82d03b58976d158d Mon Sep 17 00:00:00 2001 From: Werner Henze Date: Wed, 1 Jan 2025 14:40:12 +0100 Subject: [PATCH] Get rid of FAIL_ON_SOME_PLATFORMS --- tests/span_tests.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index ca6c4f5..0265090 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -1143,12 +1143,11 @@ static_assert(!CtorCompilesFor, std::array&>, "!CtorCompilesFor, std::array&>"); static_assert(CtorCompilesFor, std::array&>, "CtorCompilesFor, std::array&>"); -#ifdef FAIL_ON_SOME_PLATFORMS -// Fails for example on "Visual Studio 16 2019, windows-2019, Debug/Release, 14". -// Pass on all gcc, clang, xcode. +#if !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) +// Fails on "Visual Studio 16 2019/Visual Studio 17 2022, windows-2019/2022, Debug/Release, 14". static_assert(!CtorCompilesFor, std::array&&>, "!CtorCompilesFor, std::array&&>"); -#endif +#endif // !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) static_assert(!CtorCompilesFor, const std::array&>, "!CtorCompilesFor, const std::array&>"); static_assert(!CtorCompilesFor, const std::array&>, @@ -1172,13 +1171,11 @@ static_assert(CtorCompilesFor, std::vector&>, "CtorCompilesFor, std::vector&>"); static_assert(CtorCompilesFor, std::vector&&>, "CtorCompilesFor, std::vector&&>"); -#ifdef FAIL_ON_SOME_PLATFORMS -// Fails for example on "Visual Studio 16 2019, windows-2019, Debug/Release, 14" and -// "Visual Studio 17 2022, windows-2022, Release, 14". -// Pass on all gcc, clang, xcode. +#if !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) +// Fails on "Visual Studio 16 2019/Visual Studio 17 2022, windows-2019/2022, Debug/Release, 14". static_assert(!CtorCompilesFor, std::vector&&>, "!CtorCompilesFor, std::vector&&>"); -#endif +#endif // !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) static_assert(!CtorCompilesFor, const std::vector&&>, "!CtorCompilesFor, const std::vector&&>"); @@ -1219,12 +1216,11 @@ static_assert(!ConversionCompilesFor, std::array>, "!ConversionCompilesFor, std::array>"); static_assert(ConversionCompilesFor, std::vector>, "ConversionCompilesFor, std::vector>"); -#ifdef FAIL_ON_SOME_PLATFORMS -// Fails for example on "Visual Studio 16 2019, windows-2019, Debug/Release, 14". -// Pass on all gcc, clang, xcode. +#if !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) +// Fails on "Visual Studio 16 2019/Visual Studio 17 2022, windows-2019/2022, Debug/Release, 14". static_assert(!ConversionCompilesFor, std::vector>, "!ConversionCompilesFor, std::vector>"); -#endif +#endif // !defined(_MSC_VER) || (_MSC_VER > 1942) || (__cplusplus >= 201703L) #if __cplusplus < 201703L static_assert(!ConversionCompilesFor, std::string>, "!ConversionCompilesFor, std::string>");