mirror of
https://github.com/nlohmann/json.git
synced 2026-02-27 22:06:25 +00:00
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user