docs: correct erase() empty-range and initializer-list move documentation (#6122)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Shubham Shakti authored and GitHub committed 2026-11-18 08:56:46 +01:00
1 parent 2951790d40
commit 0ac14610d6
3 files changed
+13 -7

No files matched your search

+3 -1
View File
@@ -18,7 +18,9 @@ JSON object value
## Exception safety
Strong guarantee: if an exception is thrown, there are no changes in the JSON value.
Strong guarantee: if an exception is thrown, there are no changes in the JSON value. Values that are moved into `init`
(e.g., `a` in `#!cpp json::object({std::move(a), 5})`) are moved when the initializer list is created, before this
function runs, and stay moved-from if it throws.
## Exceptions