Skip to content

Commit

Permalink
range and const
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Jan 30, 2024
1 parent 6f41d1e commit 92f0969
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
3 changes: 2 additions & 1 deletion doc/ref/corelib/json/array_range.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

```cpp
range<array_iterator,const_array_iterator> array_range();
range<const_array_iterator,const_array_iterator> array_range() const;
range<const_array_iterator,const_array_iterator> array_range() const; (until 0.173.3)
const range<const_array_iterator,const_array_iterator> array_range() const; (since 0.173.3)
```
Returns a [range](range.md) that supports a range-based for loop over the elements of a `json` array
Throws `std::domain_error` if not an array.
Expand Down
3 changes: 2 additions & 1 deletion doc/ref/corelib/json/object_range.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

```c++
range<object_iterator,const_object_iterator> object_range();
range<const_object_iterator,const_object_iterator> object_range() const;
range<const_object_iterator,const_object_iterator> object_range() const; (until 0.173.3)
const range<const_object_iterator,const_object_iterator> object_range() const; (since 0.173.3)
```
Returns a [range](range.md) that supports a range-based for loop over the key-value pairs of a `basic_json` object
Throws `std::domain_error` if not an object.
Expand Down
28 changes: 16 additions & 12 deletions doc/ref/corelib/json/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,26 @@ Member type |Definition
### Range access
iterator begin();
const_iterator begin() const noexcept;
const_iterator cbegin() const noexcept;
iterator begin() noexcept;
const_iterator begin() const noexcept; (since 0.173.3)
const_iterator cbegin(); (until 0.173.3)
const_iterator cbegin() const noexcept; (since 0.173.3)
Returns an iterator to the beginning
iterator end();
const_iterator end() const;
const_iterator cend();
iterator end() noexcept;
const_iterator end() const noexcept; (since 0.173.3)
const_iterator cend(); (until 0.173.3)
const_iterator cend() const noexcept; (since 0.173.3)
Returns an iterator to the end
reverse_iterator rbegin();
const_reverse_iterator rbegin() const noexcept;
const_reverse_iterator crbegin() const noexcept;
reverse_iterator rbegin() noexcept;
const_reverse_iterator rbegin() const noexcept; (since 0.173.3)
const_reverse_iterator crbegin(); (until 0.173.3)
const_reverse_iterator crbegin() const noexcept; (since 0.173.3)
Returns a reverse iterator to the beginning
reverse_iterator rend();
const_reverse_iterator rend() const noexcept;
const_reverse_iterator crend() const noexcept;
reverse_iterator rend() noexcept;
const_reverse_iterator rend() const noexcept; (since 0.173.3)
const_reverse_iterator crend(); (until 0.173.3)
const_reverse_iterator crend() const noexcept; (since 0.173.3)
Returns a reverse iterator to the end

0 comments on commit 92f0969

Please sign in to comment.