summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/mse/msemstdvector.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/debug/mse/msemstdvector.h b/src/debug/mse/msemstdvector.h
index 0099486f0..fa7d848bc 100644
--- a/src/debug/mse/msemstdvector.h
+++ b/src/debug/mse/msemstdvector.h
@@ -245,20 +245,16 @@ namespace mse {
friend class /*_Myt*/vector<_Ty, _A>;
};
- iterator begin()
- { // return iterator for beginning of mutable sequence
+ iterator begin() { // return iterator for beginning of mutable sequence
iterator retval; retval.m_msevector_shptr = this->m_shptr;
(retval.m_ss_iterator) = m_shptr->ss_begin();
return retval;
}
-
- const_iterator begin() const
- { // return iterator for beginning of nonmutable sequence
+ const_iterator begin() const { // return iterator for beginning of nonmutable sequence
const_iterator retval; retval.m_msevector_cshptr = this->m_shptr;
(retval.m_ss_const_iterator) = m_shptr->ss_begin();
return retval;
}
-
iterator end() { // return iterator for end of mutable sequence
iterator retval; retval.m_msevector_shptr = this->m_shptr;
(retval.m_ss_iterator) = m_shptr->ss_end();
@@ -280,6 +276,28 @@ namespace mse {
return retval;
}
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ reverse_iterator rbegin() { // return iterator for beginning of reversed mutable sequence
+ return (reverse_iterator(end()));
+ }
+ const_reverse_iterator rbegin() const { // return iterator for beginning of reversed nonmutable sequence
+ return (const_reverse_iterator(end()));
+ }
+ reverse_iterator rend() { // return iterator for end of reversed mutable sequence
+ return (reverse_iterator(begin()));
+ }
+ const_reverse_iterator rend() const { // return iterator for end of reversed nonmutable sequence
+ return (const_reverse_iterator(begin()));
+ }
+ const_reverse_iterator crbegin() const { // return iterator for beginning of reversed nonmutable sequence
+ return (rbegin());
+ }
+ const_reverse_iterator crend() const { // return iterator for end of reversed nonmutable sequence
+ return (rend());
+ }
+
vector(const const_iterator &start, const const_iterator &end, const _A& _Al = _A())
: m_shptr(std::make_shared<_MV>(start.msevector_ss_const_iterator_type(), end.msevector_ss_const_iterator_type(), _Al)) {}