From 00e1a7d85596c13d3e0c1d6037ad6a9630adedc7 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 27 Apr 2025 16:00:17 +0200 Subject: [PATCH 1/3] :bug: add missing header Signed-off-by: Niels Lohmann --- include/nlohmann/detail/conversions/from_json.hpp | 4 ++++ single_include/nlohmann/json.hpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index 3a24a6f4d2..adb461c7af 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -34,6 +34,10 @@ #include // optional #endif +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM + #include // u8string_view +#endif + NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 93e5983cf1..374b54ecbc 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4819,6 +4819,10 @@ NLOHMANN_JSON_NAMESPACE_END #include // optional #endif +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM + #include // u8string_view +#endif + NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { From 1697c863910a14980731a10b6ec8a4e03a25f513 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 27 Apr 2025 16:19:33 +0200 Subject: [PATCH 2/3] :rotating_light: fix warning Signed-off-by: Niels Lohmann --- tests/src/unit-regression2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-regression2.cpp b/tests/src/unit-regression2.cpp index 509abe9860..33e913cd22 100644 --- a/tests/src/unit-regression2.cpp +++ b/tests/src/unit-regression2.cpp @@ -396,7 +396,7 @@ struct Example_3810 Example_3810() = default; }; -NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Example_3810, bla); // NOLINT(misc-use-internal-linkage) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Example_3810, bla) // NOLINT(misc-use-internal-linkage) ///////////////////////////////////////////////////////////////////// // for #4740 From 03e869fc3c67ae1cce431940dc13230edde4c896 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 27 Apr 2025 16:35:16 +0200 Subject: [PATCH 3/3] :rotating_light: fix warning Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/community/quality_assurance.md | 1 + tests/src/unit-user_defined_input.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/mkdocs/docs/community/quality_assurance.md b/docs/mkdocs/docs/community/quality_assurance.md index 82e03211d4..29da7a512b 100644 --- a/docs/mkdocs/docs/community/quality_assurance.md +++ b/docs/mkdocs/docs/community/quality_assurance.md @@ -76,6 +76,7 @@ violations will result in a failed build. | GNU 13.3.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub | | GNU 14.2.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub | | GNU 14.2.0 | arm64 | Linux 6.1.100 | Cirrus CI | + | GNU 15.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub | | icpc (ICC) 2021.5.0 20211109 | x86_64 | Ubuntu 20.04.3 LTS | GitHub | | MSVC 19.0.24241.7 | x86 | Windows 8.1 | AppVeyor | | MSVC 19.16.27035.0 | x86 | Windows-10 (Build 14393) | AppVeyor | diff --git a/tests/src/unit-user_defined_input.cpp b/tests/src/unit-user_defined_input.cpp index befc4b17af..5115e8fd30 100644 --- a/tests/src/unit-user_defined_input.cpp +++ b/tests/src/unit-user_defined_input.cpp @@ -60,12 +60,12 @@ TEST_CASE("Custom container member begin/end") { const char* data; - const char* begin() const + const char* begin() const noexcept { return data; } - const char* end() const + const char* end() const noexcept { return data + strlen(data); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) }