mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 13:10:33 +00:00
935 B
935 B
nlohmann::basic_json::cbegin
const_iterator cbegin() const noexcept;
Returns an iterator to the first element.
Return value
iterator to the first element
Exception safety
No-throw guarantee: this member function never throws exceptions.
Complexity
Constant.
Examples
??? example
The following code shows an example for `cbegin()`.
```cpp
--8<-- "examples/cbegin.cpp"
```
Output:
```json
--8<-- "examples/cbegin.output"
```
See also
- begin returns an iterator to the first element
- cend returns a const iterator to one past the last element
- crbegin returns a const reverse iterator to the last element
- Iterators - the article on iterators
Version history
- Added in version 1.0.0.