finish bonus 2

This commit is contained in:
2024-03-28 04:22:48 +00:00
parent 8132ef130a
commit 0be1e6fb69
6 changed files with 114 additions and 2 deletions

View File

@ -348,11 +348,13 @@ class vector {
* returns an iterator to the beginning.
*/
iterator begin() { return iterator(this, raw_beg); }
const_iterator begin() const { return const_iterator(this, raw_beg); }
const_iterator cbegin() const { return const_iterator(this, raw_beg); }
/**
* returns an iterator to the end.
*/
iterator end() { return iterator(this, raw_end); }
const_iterator end() const { return const_iterator(this, raw_end); }
const_iterator cend() const { return const_iterator(this, raw_end); }
/**
* checks whether the container is empty