mirror of
https://github.com/nlohmann/json.git
synced 2026-10-13 09:47:12 +00:00
Overwork documentation (#4516)
This commit is contained in:
1 parent
9f60e85557
commit
549c79ba7e
68 files changed
+1085
-335
No files matched your search
@@ -6,6 +6,13 @@ using ordered_json = basic_json<ordered_map>;
|
||||
|
||||
This type preserves the insertion order of object keys.
|
||||
|
||||
## Iterator invalidation
|
||||
|
||||
The type is based on [`ordered_map`](ordered_map.md) which in turn uses a `std::vector` to store object elements.
|
||||
Therefore, adding object elements can yield a reallocation in which case all iterators (including the
|
||||
[`end()`](basic_json/end.md) iterator) and all references to the elements are invalidated. Also, any iterator or
|
||||
reference after the insertion point will point to the same index which is now a different value.
|
||||
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
Reference in new issue
Block a user