This commit is contained in:
nlohmann
2026-11-18 23:40:28 +00:00
parent 70feeb496c
commit 8279f43a4b
471 changed files with 1737 additions and 1335 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -265,7 +265,9 @@ basic_json(basic_json&& other) noexcept;
4. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no
`to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any
JSON value.
5. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
5. Strong guarantee: if an exception is thrown, there are no changes to any 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 the constructor runs, and stay moved-from if it throws.
6. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
7. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
8. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -196,7 +196,7 @@ this requirement is not met.
1. No-throw guarantee: this constructor never throws exceptions.
1. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no `to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any JSON value. **Exception:** when `val` is an rvalue array-like or object-like container, its elements are moved one by one; if an exception is thrown in the middle of the conversion (e.g., an allocation failure), the JSON value is unchanged, but the source container may be left partially moved-from.
1. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no `to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any JSON value.
1. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
1. Strong guarantee: if an exception is thrown, there are no changes to any JSON value. Values that are moved into `init` (e.g., `a` in `json::object({std::move(a), 5})`) are moved when the initializer list is created, before the constructor runs, and stay moved-from if it throws.
1. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
1. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
1. Strong guarantee: if an exception is thrown, there are no changes to any JSON value.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7 -5
View File
@@ -26,10 +26,12 @@ void erase(const size_type idx);
If called on a primitive type other than `#!json null`, the resulting JSON value will be `#!json null`.
2. Remove an element range specified by `[first; last)` from a JSON value. The iterator `first` does not need to be
dereferenceable if `first == last`: erasing an empty range is a no-op.
2. Remove an element range specified by `[first; last)` from a JSON value. For arrays and objects, the iterator `first`
does not need to be dereferenceable if `first == last`: erasing an empty range is a no-op.
If called on a primitive type other than `#!json null`, the resulting JSON value will be `#!json null`.
If called on a primitive type other than `#!json null`, the range must be `[begin(); end())`, and the resulting JSON
value will be `#!json null`. Any other range, including the empty ranges `[begin(); begin())` and
`[end(); end())`, throws [`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204).
3. Removes an element from a JSON object by key.
@@ -93,8 +95,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
- Throws [`invalid_iterator.203`](../../home/exceptions.md#jsonexceptioninvalid_iterator203) if called on iterators
which does not belong to the current JSON value; example: `"iterators do not fit current value"`
- Throws [`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) if called on a
primitive type with invalid iterators (i.e., if `first != begin()` and `last != end()`); example: `"iterators out
of range"`
primitive type with invalid iterators (i.e., if `first != begin()` or `last != end()`, which includes the empty
ranges `[begin(); begin())` and `[end(); end())`); example: `"iterators out of range"`
3. The function can throw the following exceptions:
- Throws [`type_error.307`](../../home/exceptions.md#jsonexceptiontype_error307) when called on a type other than
JSON object; example: `"cannot use erase() with null"`
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -24,9 +24,9 @@ void erase(const size_type idx);
If called on a primitive type other than `null`, the resulting JSON value will be `null`.
1. Remove an element range specified by `[first; last)` from a JSON value. The iterator `first` does not need to be dereferenceable if `first == last`: erasing an empty range is a no-op.
1. Remove an element range specified by `[first; last)` from a JSON value. For arrays and objects, the iterator `first` does not need to be dereferenceable if `first == last`: erasing an empty range is a no-op.
If called on a primitive type other than `null`, the resulting JSON value will be `null`.
If called on a primitive type other than `null`, the range must be `[begin(); end())`, and the resulting JSON value will be `null`. Any other range, including the empty ranges `[begin(); begin())` and `[end(); end())`, throws [`invalid_iterator.204`](https://json.nlohmann.me/home/exceptions/#jsonexceptioninvalid_iterator204).
1. Removes an element from a JSON object by key.
@@ -71,7 +71,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
1. The function can throw the following exceptions:
- Throws [`type_error.307`](https://json.nlohmann.me/home/exceptions/#jsonexceptiontype_error307) if called on a `null` value; example: `"cannot use erase() with null"`
- Throws [`invalid_iterator.203`](https://json.nlohmann.me/home/exceptions/#jsonexceptioninvalid_iterator203) if called on iterators which does not belong to the current JSON value; example: `"iterators do not fit current value"`
- Throws [`invalid_iterator.204`](https://json.nlohmann.me/home/exceptions/#jsonexceptioninvalid_iterator204) if called on a primitive type with invalid iterators (i.e., if `first != begin()` and `last != end()`); example: `"iterators out of range"`
- Throws [`invalid_iterator.204`](https://json.nlohmann.me/home/exceptions/#jsonexceptioninvalid_iterator204) if called on a primitive type with invalid iterators (i.e., if `first != begin()` or `last != end()`, which includes the empty ranges `[begin(); begin())` and `[end(); end())`); example: `"iterators out of range"`
1. The function can throw the following exceptions:
- Throws [`type_error.307`](https://json.nlohmann.me/home/exceptions/#jsonexceptiontype_error307) when called on a type other than JSON object; example: `"cannot use erase() with null"`
1. See 3.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+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
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -16,7 +16,7 @@ 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 `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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More