mirror of
https://github.com/nlohmann/json.git
synced 2026-03-23 01:12:44 +00:00
Overwork documentation (#3444)
* 📝 overwork macro documentation * 📝 address review comments * 🔧 add style check to Makefile * 🙈 overwork .gitignore * 📌 Pygments 2.12.0 is broken * ✏️ fix links * 🚸 adjust output to cppcheck * 📝 add titles to more admonitions * ✏️ fix typos * 📝 document future behavior change
This commit is contained in:
@@ -74,10 +74,11 @@ Strong exception safety: if an exception occurs, the original value stays intact
|
||||
|
||||
## Notes
|
||||
|
||||
!!! danger
|
||||
!!! danger "Undefined behavior and runtime assertions"
|
||||
|
||||
1. If the element with key `idx` does not exist, the behavior is undefined.
|
||||
2. If the element with key `key` does not exist, the behavior is undefined and is **guarded by an assertion**!
|
||||
2. If the element with key `key` does not exist, the behavior is undefined and is **guarded by a
|
||||
[runtime assertion](../../features/assertions.md)**!
|
||||
|
||||
1. The non-const version may add values: If `idx` is beyond the range of the array (i.e., `idx >= size()`), then the
|
||||
array is silently filled up with `#!json null` values to make `idx` a valid reference to the last stored element. In
|
||||
|
||||
Reference in New Issue
Block a user