summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-14 16:02:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-14 16:02:47 +0300
commit6d84ee94dbd994e1e5cc735505098e0d7d3e6242 (patch)
treef536a7fc6a7b6b8c7948c0f117e265c87ff9e90f
parent76afb49e3d0044f3cbe91bc5d761c3045959496c (diff)
downloadmanaverse-6d84ee94dbd994e1e5cc735505098e0d7d3e6242.tar.gz
manaverse-6d84ee94dbd994e1e5cc735505098e0d7d3e6242.tar.bz2
manaverse-6d84ee94dbd994e1e5cc735505098e0d7d3e6242.tar.xz
manaverse-6d84ee94dbd994e1e5cc735505098e0d7d3e6242.zip
Update mse with latest changes.
-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)) {}