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 31, 2024
1 parent 234051b commit 32b0474
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
24 changes: 16 additions & 8 deletions doc/ref/corelib/json/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,26 @@ Member type |Definition
### Range access
iterator begin();
const_iterator cbegin();
iterator begin(); (until 0.173.3)
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 cend();
iterator end(); (until 0.173.3)
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 crbegin();
reverse_iterator rbegin(); (until 0.173.3)
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 crend();
reverse_iterator rend(); (until 0.173.3)
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
8 changes: 4 additions & 4 deletions include/jsoncons/basic_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ namespace jsoncons {
{
}

iterator begin()
iterator begin() const noexcept
{
return first_;
}
iterator end()
iterator end() const noexcept
{
return last_;
}
Expand All @@ -362,11 +362,11 @@ namespace jsoncons {
{
return last_;
}
reverse_iterator rbegin()
reverse_iterator rbegin() const noexcept
{
return reverse_iterator(last_);
}
reverse_iterator rend()
reverse_iterator rend() const noexcept
{
return reverse_iterator(first_);
}
Expand Down

0 comments on commit 32b0474

Please sign in to comment.