Skip to content

Commit

Permalink
check_fail_on_some_platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner Henze committed Dec 30, 2024
1 parent 47104c3 commit 51bb9c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/span_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ TEST(span_test, first)

{
span<int, 5> av = arr;
#ifdef FAIL_ON_SOME_PLATFORMS
#if 1//def FAIL_ON_SOME_PLATFORMS
EXPECT_TRUE(av.first<6>().size() == 6);
EXPECT_TRUE(av.first<-1>().size() == -1);
#endif
Expand Down Expand Up @@ -1219,10 +1219,12 @@ static_assert(!ConversionCompilesFor<span<const int, 2>, std::array<int, 4>>,
"!ConversionCompilesFor<span<const int, 2>, std::array<int, 4>>");
static_assert(ConversionCompilesFor<span<const int>, std::vector<int>>,
"ConversionCompilesFor<span<const int>, std::vector<int>>");
#ifdef FAIL_ON_SOME_PLATFORMS
// Fails for example on "Visual Studio 16 2019, windows-2019, Release, 14". Pass on all gcc, clang, xcode.
static_assert(!ConversionCompilesFor<span<int>, std::vector<int>>,
"!ConversionCompilesFor<span<int>, std::vector<int>>");
#if __cplusplus < 201703L
static_assert(!ConversionCompilesFor<span<char>, std::string>,
#endif
#if __cplusplus < 201703L static_assert(!ConversionCompilesFor<span<char>, std::string>,
"!ConversionCompilesFor<span<char>, std::string>");
#endif
static_assert(ConversionCompilesFor<span<const char>, const std::string&>,
Expand Down

0 comments on commit 51bb9c8

Please sign in to comment.