From ecff144b3a6af25bd896e3dd0d517d42850e8c8b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Thu, 9 Jul 2026 20:19:22 +0200 Subject: [PATCH] :memo: Document nvcc CUDA 12.0/12.1 JSON_HAS_RANGES exclusion (#5258) PR #5248 added a 5th JSON_HAS_RANGES exclusion branch to macro_scope.hpp (nvcc CUDA 12.0.x/12.1.x, fixed in 12.2, issue #3907) shortly after #5252 added the "Known compiler/stdlib exclusions" list to json_has_ranges.md, so the new branch was missing from the just-added doc section. Bring the list back to parity with the code (5 exclusion branches, 5 documented). Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/api/macros/json_has_ranges.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/mkdocs/docs/api/macros/json_has_ranges.md b/docs/mkdocs/docs/api/macros/json_has_ranges.md index 287ba69eb..92cad07e2 100644 --- a/docs/mkdocs/docs/api/macros/json_has_ranges.md +++ b/docs/mkdocs/docs/api/macros/json_has_ranges.md @@ -22,6 +22,7 @@ When the macro is not defined, the library will define it to its default value. - **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)) + - **nvcc (CUDA) 12.0.x and 12.1.x** — disabled (the `enable_borrowed_range` variable-template syntax triggers a parse error under these two toolkit versions; fixed in CUDA 12.2; [issue #3907](https://github.com/nlohmann/json/issues/3907)) If `JSON_HAS_RANGES` is `0` despite `__cpp_lib_ranges` being defined, one of the exclusions above likely applies to your toolchain.