Fix CI on develop after #5600, #5607, and #5755

- binary_reader: cast the result of -1 - number back to number_integer_t,
  because a number_integer_t narrower than int is promoted to int, which
  GCC's -Warith-conversion rejects (ci_test_gcc, ci_test_standards_gcc)
- JSON_DELETE_DEPRECATED_FUNCTIONS: declare the deleted stream operators
  as function templates at namespace scope, because GCC < 5 rejects deleted
  friend functions ("can't initialize friend function") and Clang 7-9 report
  a redefinition when a class template has a deleted friend function
- docs: give the examples of JSON_USE_OBJECTS_FOR_ENUM_KEYED_MAPS "Example:"
  titles and add the page to the docset (style_check)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-10-05 10:37:17 +02:00
parent 23d3b373e1
commit d5a1c5d149
5 changed files with 45 additions and 18 deletions
@@ -69,7 +69,7 @@ The default value is `0` (disabled — existing behavior is preserved).
## Examples
??? example "Default behavior (macro not defined)"
??? example "Example: default behavior (macro not defined)"
Without the macro, a map with enum keys is stored as an array of pairs:
@@ -96,7 +96,7 @@ The default value is `0` (disabled — existing behavior is preserved).
}
```
??? example "Objects for enum-keyed maps (macro defined to 1)"
??? example "Example: objects for enum-keyed maps (macro defined to 1)"
With the macro, the same map is stored as an object: