Files
json/include/nlohmann
Niels Lohmann a207a03ed0 Keep the descent guard's bookkeeping self-contained
nesting_depth_limit() and nesting_depth_guard were only used inside
the JSON_NO_THREAD_LOCAL-guarded branch of copy_structured(), but were
defined unconditionally. Move them inside the #ifndef, and have the
guard look up the depth and test it against the limit itself (via
okay()) instead of making the caller do it - the caller no longer
needs to touch nesting_depth() at all. Also shrink the thread-local
counter to std::uint8_t, matching what its own doc comment already
argued.

Addresses gregmarr's review comments on #5389.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-09-03 20:36:03 +02:00
..
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00