✏️ fix typos

This commit is contained in:
Niels Lohmann 2022-04-25 20:05:23 +02:00
parent d356facdee
commit a8ee44df41
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
5 changed files with 15 additions and 3 deletions

View File

@ -33,6 +33,12 @@ If the JSON value is `#!json null`, exception
Constant. Constant.
## Notes
!!! info "Precondition"
The array or object must not be empty. Calling `back` on an empty array or object yields undefined behavior.
## Examples ## Examples
??? example ??? example

View File

@ -26,6 +26,12 @@ If the JSON value is `#!json null`, exception
Constant. Constant.
## Notes
!!! info "Precondition"
The array or object must not be empty. Calling `front` on an empty array or object yields undefined behavior.
## Examples ## Examples
??? example ??? example

View File

@ -8,7 +8,7 @@ using object_comparator_t = std::less<>; // since C++14
The comparator used in [`object_t`](object_t.md). The comparator used in [`object_t`](object_t.md).
When C++14 is detected, a transparent com parator is used which, when combined with perfect forwarding on find() and When C++14 is detected, a transparent comparator is used which, when combined with perfect forwarding on find() and
count() calls, prevents unnecessary string construction. count() calls, prevents unnecessary string construction.
## Version history ## Version history

View File

@ -5,7 +5,7 @@
``` ```
When defined, headers `<cstdio>`, `<ios>`, `<iosfwd>`, `<istream>`, and `<ostream>` are not included and parse functions When defined, headers `<cstdio>`, `<ios>`, `<iosfwd>`, `<istream>`, and `<ostream>` are not included and parse functions
relying on these headers are excluded. This is relevant for environment where these I/O functions are disallowed for relying on these headers are excluded. This is relevant for environments where these I/O functions are disallowed for
security reasons (e.g., Intel Software Guard Extensions (SGX)). security reasons (e.g., Intel Software Guard Extensions (SGX)).
## Default definition ## Default definition

View File

@ -20,7 +20,7 @@ before including the `json.hpp` header.
Function [`operator[]`](../api/basic_json/operator%5B%5D.md) implements unchecked access for objects. Whereas a missing Function [`operator[]`](../api/basic_json/operator%5B%5D.md) implements unchecked access for objects. Whereas a missing
key is added in case of non-const objects, accessing a const object with a missing key is undefined behavior (think of a key is added in case of non-const objects, accessing a const object with a missing key is undefined behavior (think of a
dereferenced null pointer) and yields an runtime assertion. dereferenced null pointer) and yields a runtime assertion.
If you are not sure whether an element in an object exists, use checked access with the If you are not sure whether an element in an object exists, use checked access with the
[`at` function](../api/basic_json/at.md) or call the [`contains` function](../api/basic_json/contains.md) before. [`at` function](../api/basic_json/at.md) or call the [`contains` function](../api/basic_json/contains.md) before.