util/StringBuffer: add non-const iterator

This commit is contained in:
Max Kellermann 2022-11-28 22:57:59 +01:00
parent 66029c405f
commit 40d0828ccd

View File

@ -51,6 +51,7 @@ protected:
Array the_data;
public:
using iterator = typename Array::iterator;
using const_iterator = typename Array::const_iterator;
static constexpr size_type capacity() noexcept {
@ -91,6 +92,14 @@ public:
return the_data[i];
}
constexpr iterator begin() noexcept {
return the_data.begin();
}
constexpr iterator end() noexcept {
return the_data.end();
}
constexpr const_iterator begin() const noexcept {
return the_data.begin();
}