mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-18 17:02:06 +03:00
memoryview: add support for reverse iteration
This commit is contained in:
parent
2d42783dbd
commit
aaa6d3ab39
@ -44,6 +44,10 @@ public:
|
||||
const T* begin() const { return m_pointer; }
|
||||
const T* end() const { return m_pointer+m_size; }
|
||||
|
||||
using reverse_iterator = std::reverse_iterator<const T*>;
|
||||
reverse_iterator rbegin() const { return reverse_iterator(m_pointer+m_size); }
|
||||
reverse_iterator rend() const { return reverse_iterator(m_pointer); }
|
||||
|
||||
const T& front() const { return *m_pointer; }
|
||||
const T& back() const { return *(m_pointer + m_size - 1); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user