This commit is contained in:
nlohmann
2026-07-09 15:25:36 +00:00
parent cb1c51b1d0
commit a72084fa16
258 changed files with 309 additions and 255 deletions
File diff suppressed because one or more lines are too long
+11
View File
@@ -12,6 +12,17 @@ The default value is detected based on the preprocessor macro `__cpp_lib_ranges`
When the macro is not defined, the library will define it to its default value.
Known compiler/stdlib exclusions
Even when the feature-test macro `__cpp_lib_ranges` indicates ranges support is available, the library disables it on the following incomplete or broken toolchains:
- **GCC 11.1.0** — disabled (the shipped `<ranges>` header has a syntax error; [issue #4440](https://github.com/nlohmann/json/issues/4440))
- **libstdc++ < 11** — disabled (incomplete C++20 ranges support; [issue #4440](https://github.com/nlohmann/json/issues/4440))
- **Clang < 16 with libstdc++** — disabled (incomplete ranges support; [issue #4440](https://github.com/nlohmann/json/issues/4440))
- **libc++ < 160000** — disabled (incomplete C++20 ranges support; [issue #4440](https://github.com/nlohmann/json/issues/4440))
If `JSON_HAS_RANGES` is `0` despite `__cpp_lib_ranges` being defined, one of the exclusions above likely applies to your toolchain.
## Examples
Example