mirror of
https://github.com/nlohmann/json.git
synced 2025-05-11 05:33:55 +00:00
parent
a94430615d
commit
1a90c9463a
@ -48,6 +48,7 @@ using ordered_json = nlohmann::ordered_json;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
#if JSON_HAS_EXPERIMENTAL_FILESYSTEM
|
||||||
|
// JSON_HAS_CPP_17 (magic keyword; do not remove)
|
||||||
#include <experimental/filesystem>
|
#include <experimental/filesystem>
|
||||||
namespace nlohmann::detail
|
namespace nlohmann::detail
|
||||||
{
|
{
|
||||||
@ -61,7 +62,6 @@ namespace std_fs = std::filesystem;
|
|||||||
} // namespace nlohmann::detail
|
} // namespace nlohmann::detail
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef JSON_HAS_CPP_20
|
#ifdef JSON_HAS_CPP_20
|
||||||
#include <span>
|
#include <span>
|
||||||
#endif
|
#endif
|
||||||
@ -793,8 +793,8 @@ TEST_CASE("regression tests 2")
|
|||||||
const auto j_path = j.get<nlohmann::detail::std_fs::path>();
|
const auto j_path = j.get<nlohmann::detail::std_fs::path>();
|
||||||
CHECK(j_path == text_path);
|
CHECK(j_path == text_path);
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ == 8 && __GNUC_MINOR__ < 4)
|
||||||
// works everywhere but on MSVC
|
// works everywhere but on MSVC and GCC <8.4
|
||||||
CHECK_THROWS_WITH_AS(nlohmann::detail::std_fs::path(json(1)), "[json.exception.type_error.302] type must be string, but is number", json::type_error);
|
CHECK_THROWS_WITH_AS(nlohmann::detail::std_fs::path(json(1)), "[json.exception.type_error.302] type must be string, but is number", json::type_error);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user