Fix CI issues (#3906)

Co-authored-by: barcode <barcode@example.com>
This commit is contained in:
Raphael Grimm
2023-01-31 19:23:37 +01:00
committed by GitHub
parent da6b908c4f
commit 233d233439
6 changed files with 24 additions and 18 deletions

View File

@@ -37,7 +37,9 @@ using ordered_json = nlohmann::ordered_json;
#endif
#ifdef JSON_HAS_CPP_20
#include <span>
#if __has_include(<span>)
#include <span>
#endif
#endif
// NLOHMANN_JSON_SERIALIZE_ENUM uses a static std::pair
@@ -664,6 +666,7 @@ TEST_CASE("regression tests 2")
}
#ifdef JSON_HAS_CPP_20
#if __has_include(<span>)
SECTION("issue #2546 - parsing containers of std::byte")
{
const char DATA[] = R"("Hello, world!")"; // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
@@ -671,6 +674,7 @@ TEST_CASE("regression tests 2")
const json j = json::parse(s);
CHECK(j.dump() == "\"Hello, world!\"");
}
#endif
#endif
SECTION("issue #2574 - Deserialization to std::array, std::pair, and std::tuple with non-default constructable types fails")