Update gnustl.hpp

This commit is contained in:
alk 2022-11-25 01:30:17 +03:00 committed by GitHub
parent 3ba1ad12ff
commit 202b60edd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,6 +330,14 @@ namespace gd {
m_capacity_end = m_start + input.size();
std::copy(input.begin(), input.end(), tmp);
}
void clear() {
delete[] m_start;
auto tmp = new T[0];
m_start = tmp;
m_finish = m_start;
m_capacity_end = m_start;
}
T& front() {
return *m_start;