Skip to content

Commit

Permalink
Incorporate doc review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
falbrechtskirchinger committed Apr 25, 2022
1 parent d659ed9 commit 99ceaef
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions doc/mkdocs/docs/api/basic_json/at.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const_reference at(const json_pointer& ptr) const;
1. reference to the element at index `idx`
2. reference to the element at key `key`
3. see 2
3. reference to the element at key `key`
4. reference to the element pointed to by `ptr`
## Exception safety
Expand Down Expand Up @@ -85,10 +85,10 @@ Strong exception safety: if an exception occurs, the original value stays intact
## Complexity
1. Constant
1. Constant.
2. Logarithmic in the size of the container.
3. See 2.
4. Constant
3. Logarithmic in the size of the container.
4. Logarithmic in the size of the container.
## Examples
Expand Down
4 changes: 2 additions & 2 deletions doc/mkdocs/docs/api/basic_json/contains.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool contains(const json_pointer& ptr) const;
JSON value is not an object, `#!cpp false` is returned.
2. See 1. This overload is only available if `KeyType` is comparable with `#!cpp typename object_t::key_type` and
`#!cpp typename object_comparator_t::is_transparent` denotes a type.
4. Check whether the given JSON pointer `ptr` can be resolved in the current JSON value.
3. Check whether the given JSON pointer `ptr` can be resolved in the current JSON value.
## Template parameters
Expand Down Expand Up @@ -47,7 +47,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
## Exceptions
1. The function does not throw exceptions.
2. See 1.
2. The function does not throw exceptions.
3. The function can throw the following exceptions:
- Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index begins with
`0`.
Expand Down
2 changes: 1 addition & 1 deletion doc/mkdocs/docs/api/basic_json/erase.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
- strings and binary: linear in the length of the member
- other types: constant
3. `log(size()) + count(key)`
4. See 3.
4. `log(size()) + count(key)`
5. Linear in distance between `idx` and the end of the container.
## Notes
Expand Down
15 changes: 8 additions & 7 deletions doc/mkdocs/docs/api/basic_json/operator[].md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ const_reference operator[](const json_pointer& ptr) const;

## Return value

1. reference to the element at index `idx`
2. reference to the element at key `key`
3. see 2
4. reference to the element pointed to by `ptr`
1. (const) reference to the element at index `idx`
2. (const) reference to the element at key `key`
3. (const) reference to the element at key `key`
4. (const) reference to the element pointed to by `ptr`

## Exception safety

Expand All @@ -63,7 +63,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
2. The function can throw the following exceptions:
- Throws [`type_error.305`](../../home/exceptions.md#jsonexceptiontype_error305) if the JSON value is not an object
or null; in that case, using the `[]` operator with a key makes no sense.
3. The function can throw the following exceptions:
3. See 2.
4. The function can throw the following exceptions:
- Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index in the passed
JSON pointer `ptr` begins with '0'.
- Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) if an array index in the passed
Expand All @@ -77,8 +78,8 @@ Strong exception safety: if an exception occurs, the original value stays intact

1. Constant if `idx` is in the range of the array. Otherwise, linear in `idx - size()`.
2. Logarithmic in the size of the container.
3. See 2.
4. Constant
3. Logarithmic in the size of the container.
4. Logarithmic in the size of the container.

## Notes

Expand Down
2 changes: 1 addition & 1 deletion doc/mkdocs/docs/api/basic_json/value.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ValueType value(const json_pointer& ptr,
## Return value
1. copy of the element at key `key` or `default_value` if `key` is not found
2. see 1
2. copy of the element at key `key` or `default_value` if `key` is not found
3. copy of the element at JSON Pointer `ptr` or `default_value` if no value for `ptr` is found
## Exception safety
Expand Down

0 comments on commit 99ceaef

Please sign in to comment.