Skip to content

Commit

Permalink
vector::cbegin cend
Browse files Browse the repository at this point in the history
  • Loading branch information
埃博拉酱 committed Oct 5, 2024
1 parent 11ff791 commit 4ea9cab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/vector
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ namespace std
return data_;
}

inline const_iterator cbegin() const
{
return data_;
}

inline iterator end()
{
return (data_ + elements);
Expand All @@ -193,6 +198,11 @@ namespace std
return (data_ + elements);
}

inline const_iterator cend() const
{
return (data_ + elements);
}

inline reverse_iterator rbegin()
{
return reverse_iterator(end());
Expand All @@ -203,6 +213,11 @@ namespace std
return const_reverse_iterator(end());
}

inline const_reverse_iterator crbegin() const
{
return const_reverse_iterator(end());
}

inline reverse_iterator rend()
{
return reverse_iterator(begin());
Expand All @@ -213,6 +228,11 @@ namespace std
return const_reverse_iterator(begin());
}

inline const_reverse_iterator crend() const
{
return const_reverse_iterator(begin());
}

inline size_type size() const
{
return elements;
Expand Down

0 comments on commit 4ea9cab

Please sign in to comment.