mirror of
https://github.com/nlohmann/json.git
synced 2026-10-27 16:28:57 +00:00
Add See also links in both directions between the concept pages (features, home, integration) and the API pages, write API links in code font, give every entry a comment after a dash, and show the callback event figure on the parser callbacks page. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
1.3 KiB
1.3 KiB
nlohmann::basic_json::cend
const_iterator cend() const noexcept;
Returns an iterator to one past the last element.
--8<-- "images/range-begin-end.svg"
`cend()` points to the position after the last element, like `end()`, and `begin()` to the first element; the dashed cell is the past-the-last position, which must not be dereferenced.
Return value
iterator one past the last element
Exception safety
No-throw guarantee: this member function never throws exceptions.
Complexity
Constant.
Examples
??? example
The following code shows an example for `cend()`.
```cpp
--8<-- "examples/cend.cpp"
```
Output:
```json
--8<-- "examples/cend.output"
```
See also
end- returns an iterator to one past the last elementcbegin- returns a const iterator to the first elementcrend- returns a const reverse iterator to one before the first element- Iterators - the article on iterators
basic_json_view::cend- the same iteration on a zero-copy view
Version history
- Added in version 1.0.0.