ManaPlus
msemstdvector.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2015 Noah Lopez
3 // Use, modification, and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef MSEMSTDVECTOR_H
8 #define MSEMSTDVECTOR_H
9 
10 #include "debug/mse/msemsevector.h"
11 
12 #ifdef MSE_SAFER_SUBSTITUTES_DISABLED
13 #define MSE_MSTDVECTOR_DISABLED
14 #endif /*MSE_SAFER_SUBSTITUTES_DISABLED*/
15 
16 namespace mse {
17 
18  namespace mstd {
19 
20 #ifdef MSE_MSTDVECTOR_DISABLED
21  template<class _Ty, class _A = std::allocator<_Ty> > using vector = std::vector<_Ty, _A>;
22 
23 #else /*MSE_MSTDVECTOR_DISABLED*/
24 
25 #ifndef _NOEXCEPT
26 #define _NOEXCEPT
27 #endif /*_NOEXCEPT*/
28 
29  template<class _Ty, class _A = std::allocator<_Ty> >
30  class vector {
31  public:
34 
35  typedef typename _MV::allocator_type allocator_type;
36  typedef typename _MV::value_type value_type;
37  typedef typename _MV::size_type size_type;
39  typedef typename _MV::pointer pointer;
41  typedef typename _MV::reference reference;
43 
44  const _MV& msevector() const { return (*m_shptr); }
45  _MV& msevector() { return (*m_shptr); }
46  operator const _MV() const { return msevector(); }
47  operator _MV() { return msevector(); }
48 
49  explicit vector(const _A& _Al = _A()) : m_shptr(std::make_shared<_MV>(_Al)) {}
50  explicit vector(size_type _N) : m_shptr(std::make_shared<_MV>(_N)) {}
51  explicit vector(size_type _N, const _Ty& _V, const _A& _Al = _A()) : m_shptr(std::make_shared<_MV>(_N, _V, _Al)) {}
52  vector(_Myt&& _X) : m_shptr(std::make_shared<_MV>(std::move(_X.msevector()))) {}
53  vector(const _Myt& _X) : m_shptr(std::make_shared<_MV>(_X.msevector())) {}
54  vector(_MV&& _X) : m_shptr(std::make_shared<_MV>(std::move(_X))) {}
55  vector(const _MV& _X) : m_shptr(std::make_shared<_MV>(_X)) {}
56  vector(std::vector<_Ty>&& _X) : m_shptr(std::make_shared<_MV>(std::move(_X))) {}
57  vector(const std::vector<_Ty>& _X) : m_shptr(std::make_shared<_MV>(_X)) {}
58  typedef typename _MV::const_iterator _It;
59  vector(_It _F, _It _L, const _A& _Al = _A()) : m_shptr(std::make_shared<_MV>(_F, _L, _Al)) {}
60  vector(const _Ty* _F, const _Ty* _L, const _A& _Al = _A()) : m_shptr(std::make_shared<_MV>(_F, _L, _Al)) {}
61  template<class _Iter, class = typename std::enable_if<_mse_Is_iterator<_Iter>::value, void>::type>
62  vector(_Iter _First, _Iter _Last) : m_shptr(std::make_shared<_MV>(_First, _Last)) {}
63  template<class _Iter, class = typename std::enable_if<_mse_Is_iterator<_Iter>::value, void>::type>
64  vector(_Iter _First, _Iter _Last, const _A& _Al) : m_shptr(std::make_shared<_MV>(_First, _Last, _Al)) {}
65 
66  _Myt& operator=(_MV&& _X) { m_shptr->operator=(std::move(_X)); return (*this); }
67  _Myt& operator=(const _MV& _X) { m_shptr->operator=(_X); return (*this); }
68  _Myt& operator=(_Myt&& _X) { m_shptr->operator=(std::move(_X.msevector())); return (*this); }
69  _Myt& operator=(const _Myt& _X) { m_shptr->operator=(_X.msevector()); return (*this); }
70  void reserve(size_type _Count) { m_shptr->reserve(_Count); }
71  void resize(size_type _N, const _Ty& _X = _Ty()) { m_shptr->resize(_N, _X); }
72  typename _MV::const_reference operator[](size_type _P) const { return m_shptr->operator[](_P); }
73  typename _MV::reference operator[](size_type _P) { return m_shptr->operator[](_P); }
74  void push_back(_Ty&& _X) { m_shptr->push_back(std::move(_X)); }
75  void push_back(const _Ty& _X) { m_shptr->push_back(_X); }
76  void pop_back() { m_shptr->pop_back(); }
77  void assign(_It _F, _It _L) { m_shptr->assign(_F, _L); }
78  void assign(size_type _N, const _Ty& _X = _Ty()) { m_shptr->assign(_N, _X); }
79  template<class ..._Valty>
80  void emplace_back(_Valty&& ..._Val) { m_shptr->emplace_back(std::forward<_Valty>(_Val)...); }
81  void clear() { m_shptr->clear(); }
82  void swap(_MV& _X) { m_shptr->swap(_X); }
83  void swap(_Myt& _X) { m_shptr->swap(_X.msevector()); }
84 
85  vector(_XSTD initializer_list<typename _MV::value_type> _Ilist, const _A& _Al = _A()) : m_shptr(std::make_shared<_MV>(_Ilist, _Al)) {}
86  _Myt& operator=(_XSTD initializer_list<typename _MV::value_type> _Ilist) { m_shptr->operator=(_Ilist); return (*this); }
87  void assign(_XSTD initializer_list<typename _MV::value_type> _Ilist) { m_shptr->assign(_Ilist); }
88 
89  size_type capacity() const _NOEXCEPT{ return m_shptr->capacity(); }
90  void shrink_to_fit() { m_shptr->shrink_to_fit(); }
91  size_type size() const _NOEXCEPT{ return m_shptr->size(); }
92  size_type max_size() const _NOEXCEPT{ return m_shptr->max_size(); }
93  bool empty() const _NOEXCEPT{ return m_shptr->empty(); }
94  _A get_allocator() const _NOEXCEPT{ return m_shptr->get_allocator(); }
95  typename _MV::const_reference at(size_type _Pos) const { return m_shptr->at(_Pos); }
96  typename _MV::reference at(size_type _Pos) { return m_shptr->at(_Pos); }
97  typename _MV::reference front() { return m_shptr->front(); }
98  typename _MV::const_reference front() const { return m_shptr->front(); }
99  typename _MV::reference back() { return m_shptr->back(); }
100  typename _MV::const_reference back() const { return m_shptr->back(); }
101 
102  /* Try to avoid using these whenever possible. */
104  return m_shptr->data();
105  }
106  const value_type *data() const _NOEXCEPT {
107  return m_shptr->data();
108  }
109 
110 
112  public:
116  typedef typename _MV::difference_type distance_type; // retained
119 
122  (*this) = src_cref;
123  }
129 
134  /* has_next_item_or_end_marker() is just an alias for points_to_an_item(). */
136  /* has_next() is just an alias for points_to_an_item() that's familiar to java programmers. */
143  const_iterator& operator ++() { msevector_ss_const_iterator_type().operator ++(); return (*this); }
144  const_iterator operator++(int) { const_iterator _Tmp = *this; ++*this; return (_Tmp); }
145  const_iterator& operator --() { msevector_ss_const_iterator_type().operator --(); return (*this); }
146  const_iterator operator--(int) { const_iterator _Tmp = *this; --*this; return (_Tmp); }
151  const_iterator operator+(difference_type n) const { auto retval = (*this); retval += n; return retval; }
152  const_iterator operator-(difference_type n) const { return ((*this) + (-n)); }
153  typename _MV::difference_type operator-(const const_iterator& _Right_cref) const { return msevector_ss_const_iterator_type() - (_Right_cref.msevector_ss_const_iterator_type()); }
154  typename _MV::const_reference operator*() const { return msevector_ss_const_iterator_type().operator*(); }
155  typename _MV::const_reference item() const { return operator*(); }
157  typename _MV::const_pointer operator->() const { return msevector_ss_const_iterator_type().operator->(); }
158  typename _MV::const_reference operator[](typename _MV::difference_type _Off) const { return (*(*this + _Off)); }
159  bool operator==(const const_iterator& _Right_cref) const { return msevector_ss_const_iterator_type().operator==(_Right_cref.msevector_ss_const_iterator_type()); }
160  bool operator!=(const const_iterator& _Right_cref) const { return (!(_Right_cref == (*this))); }
167  private:
168  const_iterator(std::shared_ptr<_MV> msevector_shptr) : m_msevector_cshptr(msevector_shptr) {
169  m_ss_const_iterator = msevector_shptr->ss_cbegin();
170  }
171  std::shared_ptr<const _MV> m_msevector_cshptr;
172  /* m_ss_const_iterator needs to be declared after m_msevector_cshptr so that it's destructor will be called first. */
174  friend class /*_Myt*/vector<_Ty, _A>;
175  friend class iterator;
176  };
178  public:
182  typedef typename _MV::difference_type distance_type; // retained
185 
186  iterator() {}
187  iterator(const iterator& src_cref) : m_msevector_shptr(src_cref.m_msevector_shptr) {
188  (*this) = src_cref;
189  }
193  const typename _MV::ss_iterator_type& mvssi() const { return msevector_ss_iterator_type(); }
195  operator const_iterator() const {
197  if (m_msevector_shptr) {
200  }
201  return retval;
202  }
203 
208  /* has_next_item_or_end_marker() is just an alias for points_to_an_item(). */
210  /* has_next() is just an alias for points_to_an_item() that's familiar to java programmers. */
211  bool has_next() const { return msevector_ss_iterator_type().has_next(); }
217  iterator& operator ++() { msevector_ss_iterator_type().operator ++(); return (*this); }
218  iterator operator++(int) { iterator _Tmp = *this; ++*this; return (_Tmp); }
219  iterator& operator --() { msevector_ss_iterator_type().operator --(); return (*this); }
220  iterator operator--(int) { iterator _Tmp = *this; --*this; return (_Tmp); }
223  iterator& operator +=(difference_type n) { msevector_ss_iterator_type().operator +=(n); return (*this); }
224  iterator& operator -=(difference_type n) { msevector_ss_iterator_type().operator -=(n); return (*this); }
225  iterator operator+(difference_type n) const { auto retval = (*this); retval += n; return retval; }
226  iterator operator-(difference_type n) const { return ((*this) + (-n)); }
227  typename _MV::difference_type operator-(const iterator& _Right_cref) const { return msevector_ss_iterator_type() - (_Right_cref.msevector_ss_iterator_type()); }
228  typename _MV::reference operator*() const { return msevector_ss_iterator_type().operator*(); }
229  typename _MV::reference item() const { return operator*(); }
231  typename _MV::pointer operator->() const { return msevector_ss_iterator_type().operator->(); }
232  typename _MV::reference operator[](typename _MV::difference_type _Off) const { return (*(*this + _Off)); }
233  bool operator==(const iterator& _Right_cref) const { return msevector_ss_iterator_type().operator==(_Right_cref.msevector_ss_iterator_type()); }
234  bool operator!=(const iterator& _Right_cref) const { return (!(_Right_cref == (*this))); }
235  bool operator<(const iterator& _Right) const { return (msevector_ss_iterator_type() < _Right.msevector_ss_iterator_type()); }
236  bool operator<=(const iterator& _Right) const { return (msevector_ss_iterator_type() <= _Right.msevector_ss_iterator_type()); }
237  bool operator>(const iterator& _Right) const { return (msevector_ss_iterator_type() > _Right.msevector_ss_iterator_type()); }
238  bool operator>=(const iterator& _Right) const { return (msevector_ss_iterator_type() >= _Right.msevector_ss_iterator_type()); }
241  private:
242  std::shared_ptr<_MV> m_msevector_shptr;
243  /* m_ss_iterator needs to be declared after m_msevector_shptr so that it's destructor will be called first. */
245  friend class /*_Myt*/vector<_Ty, _A>;
246  };
247 
248  iterator begin() { // return iterator for beginning of mutable sequence
249  iterator retval; retval.m_msevector_shptr = this->m_shptr;
250  (retval.m_ss_iterator) = m_shptr->ss_begin();
251  return retval;
252  }
253  const_iterator begin() const { // return iterator for beginning of nonmutable sequence
254  const_iterator retval; retval.m_msevector_cshptr = this->m_shptr;
255  (retval.m_ss_const_iterator) = m_shptr->ss_begin();
256  return retval;
257  }
258  iterator end() { // return iterator for end of mutable sequence
259  iterator retval; retval.m_msevector_shptr = this->m_shptr;
260  (retval.m_ss_iterator) = m_shptr->ss_end();
261  return retval;
262  }
263  const_iterator end() const { // return iterator for end of nonmutable sequence
264  const_iterator retval; retval.m_msevector_cshptr = this->m_shptr;
265  (retval.m_ss_const_iterator) = m_shptr->ss_end();
266  return retval;
267  }
268  const_iterator cbegin() const { // return iterator for beginning of nonmutable sequence
269  const_iterator retval; retval.m_msevector_cshptr = this->m_shptr;
270  (retval.m_ss_const_iterator) = m_shptr->ss_cbegin();
271  return retval;
272  }
273  const_iterator cend() const { // return iterator for end of nonmutable sequence
274  const_iterator retval; retval.m_msevector_cshptr = this->m_shptr;
275  (retval.m_ss_const_iterator) = m_shptr->ss_cend();
276  return retval;
277  }
278 
279  typedef std::reverse_iterator<iterator> reverse_iterator;
280  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
281 
282  reverse_iterator rbegin() { // return iterator for beginning of reversed mutable sequence
283  return (reverse_iterator(end()));
284  }
285  const_reverse_iterator rbegin() const { // return iterator for beginning of reversed nonmutable sequence
286  return (const_reverse_iterator(end()));
287  }
288  reverse_iterator rend() { // return iterator for end of reversed mutable sequence
289  return (reverse_iterator(begin()));
290  }
291  const_reverse_iterator rend() const { // return iterator for end of reversed nonmutable sequence
292  return (const_reverse_iterator(begin()));
293  }
294  const_reverse_iterator crbegin() const { // return iterator for beginning of reversed nonmutable sequence
295  return (rbegin());
296  }
297  const_reverse_iterator crend() const { // return iterator for end of reversed nonmutable sequence
298  return (rend());
299  }
300 
301 
302  vector(const const_iterator &start, const const_iterator &end, const _A& _Al = _A())
303  : m_shptr(std::make_shared<_MV>(start.msevector_ss_const_iterator_type(), end.msevector_ss_const_iterator_type(), _Al)) {}
305  m_shptr->assign(start.msevector_ss_const_iterator_type(), end.msevector_ss_const_iterator_type());
306  }
307  void assign_inclusive(const const_iterator &first, const const_iterator &last) {
309  }
310  iterator insert_before(const const_iterator &pos, size_type _M, const _Ty& _X) {
311  auto res = m_shptr->insert_before(pos.msevector_ss_const_iterator_type(), _M, _X);
312  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
313  return retval;
314  }
315  iterator insert_before(const const_iterator &pos, _Ty&& _X) {
316  auto res = m_shptr->insert_before(pos.msevector_ss_const_iterator_type(), std::move(_X));
317  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
318  return retval;
319  }
320  iterator insert_before(const const_iterator &pos, const _Ty& _X = _Ty()) { return insert_before(pos, 1, _X); }
321  template<class _Iter
322  //>typename std::enable_if<_mse_Is_iterator<_Iter>::value, typename base_class::iterator>::type
323  , class = _mse_RequireInputIter<_Iter> >
324  iterator insert_before(const const_iterator &pos, const _Iter &start, const _Iter &end) {
325  auto res = m_shptr->insert_before(pos.msevector_ss_const_iterator_type(), start, end);
326  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
327  return retval;
328  }
329  template<class _Iter
330  //>typename std::enable_if<_mse_Is_iterator<_Iter>::value, typename base_class::iterator>::type
331  , class = _mse_RequireInputIter<_Iter> >
332  iterator insert_before_inclusive(const const_iterator &pos, const _Iter &first, const _Iter &last) {
333  auto end = last; end++;
334  return insert_before(pos, first, end);
335  }
336  iterator insert_before(const const_iterator &pos, _XSTD initializer_list<typename _MV::value_type> _Ilist) { // insert initializer_list
337  auto res = m_shptr->insert_before(pos.msevector_ss_const_iterator_type(), _Ilist);
338  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
339  return retval;
340  }
341  void insert_before(msev_size_t pos, const _Ty& _X = _Ty()) {
342  m_shptr->insert_before(pos, _X);
343  }
344  void insert_before(msev_size_t pos, size_type _M, const _Ty& _X) {
345  m_shptr->insert_before(pos, _M, _X);
346  }
347  void insert_before(msev_size_t pos, _XSTD initializer_list<typename _MV::value_type> _Ilist) { // insert initializer_list
348  m_shptr->insert_before(pos, _Ilist);
349  }
350  /* These insert() functions are just aliases for their corresponding insert_before() functions. */
351  iterator insert(const const_iterator &pos, size_type _M, const _Ty& _X) { return insert_before(pos, _M, _X); }
352  iterator insert(const const_iterator &pos, _Ty&& _X) { return insert_before(pos, std::move(_X)); }
353  iterator insert(const const_iterator &pos, const _Ty& _X = _Ty()) { return insert_before(pos, _X); }
354  template<class _Iter
355  //>typename std::enable_if<_mse_Is_iterator<_Iter>::value, typename base_class::iterator>::type
356  , class = _mse_RequireInputIter<_Iter> >
357  iterator insert(const const_iterator &pos, const _Iter &start, const _Iter &end) { return insert_before(pos, start, end); }
358  iterator insert(const const_iterator &pos, const _Ty* start, const _Ty* end) { return insert_before(pos, start, end); }
359  iterator insert(const const_iterator &pos, _XSTD initializer_list<typename _MV::value_type> _Ilist) { return insert_before(pos, _Ilist); }
360  template<class ..._Valty>
361  iterator emplace(const const_iterator &pos, _Valty&& ..._Val) {
362  auto res = m_shptr->emplace(pos.msevector_ss_const_iterator_type(), std::forward<_Valty>(_Val)...);
363  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
364  return retval;
365  }
367  auto res = m_shptr->erase(pos.msevector_ss_const_iterator_type());
368  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
369  return retval;
370  }
372  auto res = m_shptr->erase(start.msevector_ss_const_iterator_type(), end.msevector_ss_const_iterator_type());
373  iterator retval = begin(); retval.msevector_ss_iterator_type() = res;
374  return retval;
375  }
377  auto end = last; end.set_to_next();
378  return erase_inclusive(first, end);
379  }
380  bool operator==(const _Myt& _Right) const { // test for vector equality
381  return ((*(_Right.m_shptr)) == (*m_shptr));
382  }
383  bool operator<(const _Myt& _Right) const { // test if _Left < _Right for vectors
384  return ((*m_shptr) < (*(_Right.m_shptr)));
385  }
386 
387  private:
388  std::shared_ptr<_MV> m_shptr;
389  };
390 
391  template<class _Ty, class _Alloc> inline bool operator!=(const vector<_Ty, _Alloc>& _Left,
392  const vector<_Ty, _Alloc>& _Right) { // test for vector inequality
393  return (!(_Left == _Right));
394  }
395 
396  template<class _Ty, class _Alloc> inline bool operator>(const vector<_Ty, _Alloc>& _Left,
397  const vector<_Ty, _Alloc>& _Right) { // test if _Left > _Right for vectors
398  return (_Right < _Left);
399  }
400 
401  template<class _Ty, class _Alloc> inline bool operator<=(const vector<_Ty, _Alloc>& _Left,
402  const vector<_Ty, _Alloc>& _Right) { // test if _Left <= _Right for vectors
403  return (!(_Right < _Left));
404  }
405 
406  template<class _Ty, class _Alloc> inline bool operator>=(const vector<_Ty, _Alloc>& _Left,
407  const vector<_Ty, _Alloc>& _Right) { // test if _Left >= _Right for vectors
408  return (!(_Left < _Right));
409  }
410 #endif /*MSE_MSTDVECTOR_DISABLED*/
411  }
412 }
413 #endif /*ndef MSEMSTDVECTOR_H*/
void set_to_const_item_pointer(const ss_const_iterator_type &_Right_cref)
base_class::const_iterator::iterator_category iterator_category
const_reference previous_item() const
base_class::iterator::iterator_category iterator_category
void set_to_item_pointer(const ss_iterator_type &_Right_cref)
void advance(difference_type n)
void regress(difference_type n)
base_class::const_pointer const_pointer
Definition: msemsevector.h:161
msev_int difference_type
Definition: msemsevector.h:159
base_class::value_type value_type
Definition: msemsevector.h:155
base_class::pointer pointer
Definition: msemsevector.h:160
msev_size_t size_type
Definition: msemsevector.h:157
base_class::const_reference const_reference
Definition: msemsevector.h:163
base_class::reference reference
Definition: msemsevector.h:162
_MV::ss_const_iterator_type::pointer pointer
const_iterator(std::shared_ptr< _MV > msevector_shptr)
const _MV::ss_const_iterator_type & mvssci() const
bool operator>=(const const_iterator &_Right) const
const_iterator & operator+=(difference_type n)
_MV::ss_const_iterator_type & mvssci()
_MV::const_pointer operator->() const
const_iterator operator+(difference_type n) const
bool operator>(const const_iterator &_Right) const
_MV::ss_const_iterator_type m_ss_const_iterator
_MV::ss_const_iterator_type::reference reference
_MV::ss_const_iterator_type & msevector_ss_const_iterator_type()
void regress(typename _MV::difference_type n)
_MV::ss_const_iterator_type::difference_type difference_type
bool operator<=(const const_iterator &_Right) const
_MV::difference_type distance_type
bool operator!=(const const_iterator &_Right_cref) const
const_iterator & operator-=(difference_type n)
_MV::ss_const_iterator_type::value_type value_type
_MV::const_reference previous_item() const
const_iterator(const const_iterator &src_cref)
void set_to_const_item_pointer(const const_iterator &_Right_cref)
_MV::difference_type operator-(const const_iterator &_Right_cref) const
bool operator<(const const_iterator &_Right) const
void advance(typename _MV::difference_type n)
bool operator==(const const_iterator &_Right_cref) const
_MV::ss_const_iterator_type::iterator_category iterator_category
std::shared_ptr< const _MV > m_msevector_cshptr
_MV::const_reference item() const
_MV::const_reference operator*() const
_MV::const_reference operator[](typename _MV::difference_type _Off) const
const _MV::ss_const_iterator_type & msevector_ss_const_iterator_type() const
const_iterator operator-(difference_type n) const
_MV::reference item() const
iterator & operator-=(difference_type n)
bool operator>(const iterator &_Right) const
void regress(typename _MV::difference_type n)
std::shared_ptr< _MV > m_msevector_shptr
bool operator<(const iterator &_Right) const
_MV::ss_iterator_type m_ss_iterator
_MV::ss_iterator_type::pointer pointer
_MV::ss_iterator_type::reference reference
bool operator>=(const iterator &_Right) const
bool operator==(const iterator &_Right_cref) const
const _MV::ss_iterator_type & mvssi() const
msev_size_t position() const
bool has_next_item_or_end_marker() const
_MV::ss_iterator_type & msevector_ss_iterator_type()
const _MV::ss_iterator_type & msevector_ss_iterator_type() const
iterator operator+(difference_type n) const
_MV::difference_type operator-(const iterator &_Right_cref) const
_MV::reference operator[](typename _MV::difference_type _Off) const
bool operator<=(const iterator &_Right) const
_MV::ss_iterator_type & mvssi()
bool operator!=(const iterator &_Right_cref) const
_MV::reference previous_item() const
void set_to_item_pointer(const iterator &_Right_cref)
_MV::ss_iterator_type::difference_type difference_type
_MV::difference_type distance_type
_MV::ss_iterator_type::value_type value_type
iterator & operator+=(difference_type n)
iterator(const iterator &src_cref)
_MV::pointer operator->() const
iterator operator-(difference_type n) const
_MV::ss_iterator_type::iterator_category iterator_category
_MV::reference operator*() const
void advance(typename _MV::difference_type n)
_MV::const_reference at(size_type _Pos) const
Definition: msemstdvector.h:95
_MV::pointer pointer
Definition: msemstdvector.h:39
iterator insert_before(const const_iterator &pos, ::std::initializer_list< typename _MV::value_type > _Ilist)
_MV::reference operator[](size_type _P)
Definition: msemstdvector.h:73
void swap(_Myt &_X)
Definition: msemstdvector.h:83
_MV::value_type value_type
Definition: msemstdvector.h:36
const_reverse_iterator crend() const
iterator insert_before(const const_iterator &pos, const _Iter &start, const _Iter &end)
size_type max_size() const
Definition: msemstdvector.h:92
vector(size_type _N, const _Ty &_V, const _A &_Al=_A())
Definition: msemstdvector.h:51
vector(_It _F, _It _L, const _A &_Al=_A())
Definition: msemstdvector.h:59
void assign(_It _F, _It _L)
Definition: msemstdvector.h:77
_Myt & operator=(_Myt &&_X)
Definition: msemstdvector.h:68
_MV::const_reference front() const
Definition: msemstdvector.h:98
const_reverse_iterator crbegin() const
bool empty() const
Definition: msemstdvector.h:93
void reserve(size_type _Count)
Definition: msemstdvector.h:70
_MV::const_reference back() const
vector(const _Ty *_F, const _Ty *_L, const _A &_Al=_A())
Definition: msemstdvector.h:60
void insert_before(msev_size_t pos, ::std::initializer_list< typename _MV::value_type > _Ilist)
const_iterator cend() const
reverse_iterator rend()
const_iterator cbegin() const
_MV::allocator_type allocator_type
Definition: msemstdvector.h:35
bool operator<(const _Myt &_Right) const
iterator erase_inclusive(const const_iterator &first, const const_iterator &last)
size_type size() const
Definition: msemstdvector.h:91
iterator insert(const const_iterator &pos, const _Iter &start, const _Iter &end)
vector(const std::vector< _Ty > &_X)
Definition: msemstdvector.h:57
std::shared_ptr< _MV > m_shptr
void assign_inclusive(const const_iterator &first, const const_iterator &last)
iterator insert(const const_iterator &pos, _Ty &&_X)
const value_type * data() const
iterator insert_before(const const_iterator &pos, _Ty &&_X)
void assign(size_type _N, const _Ty &_X=_Ty())
Definition: msemstdvector.h:78
_MV::reference at(size_type _Pos)
Definition: msemstdvector.h:96
reverse_iterator rbegin()
iterator erase(const const_iterator &start, const const_iterator &end)
_Myt & operator=(const _Myt &_X)
Definition: msemstdvector.h:69
void insert_before(msev_size_t pos, const _Ty &_X=_Ty())
void swap(_MV &_X)
Definition: msemstdvector.h:82
vector(const _A &_Al=_A())
Definition: msemstdvector.h:49
const_iterator end() const
_MV::const_reference const_reference
Definition: msemstdvector.h:42
iterator insert(const const_iterator &pos, ::std::initializer_list< typename _MV::value_type > _Ilist)
iterator insert_before(const const_iterator &pos, size_type _M, const _Ty &_X)
value_type * data()
mse::mstd::vector< _Ty, _A > _Myt
Definition: msemstdvector.h:32
void assign(const const_iterator &start, const const_iterator &end)
mse::msevector< _Ty, _A > _MV
Definition: msemstdvector.h:33
void insert_before(msev_size_t pos, size_type _M, const _Ty &_X)
void push_back(const _Ty &_X)
Definition: msemstdvector.h:75
vector(::std::initializer_list< typename _MV::value_type > _Ilist, const _A &_Al=_A())
Definition: msemstdvector.h:85
std::reverse_iterator< const_iterator > const_reverse_iterator
const _MV & msevector() const
Definition: msemstdvector.h:44
_MV::reference front()
Definition: msemstdvector.h:97
void assign(::std::initializer_list< typename _MV::value_type > _Ilist)
Definition: msemstdvector.h:87
size_type capacity() const
Definition: msemstdvector.h:89
vector(const const_iterator &start, const const_iterator &end, const _A &_Al=_A())
_MV::reference reference
Definition: msemstdvector.h:41
vector(_Iter _First, _Iter _Last, const _A &_Al)
Definition: msemstdvector.h:64
void emplace_back(_Valty &&..._Val)
Definition: msemstdvector.h:80
_MV::const_reference operator[](size_type _P) const
Definition: msemstdvector.h:72
vector(_Iter _First, _Iter _Last)
Definition: msemstdvector.h:62
vector(std::vector< _Ty > &&_X)
Definition: msemstdvector.h:56
iterator insert_before_inclusive(const const_iterator &pos, const _Iter &first, const _Iter &last)
_MV::const_iterator _It
Definition: msemstdvector.h:58
_MV::difference_type difference_type
Definition: msemstdvector.h:38
iterator erase(const const_iterator &pos)
iterator insert(const const_iterator &pos, size_type _M, const _Ty &_X)
iterator insert_before(const const_iterator &pos, const _Ty &_X=_Ty())
iterator insert(const const_iterator &pos, const _Ty &_X=_Ty())
_A get_allocator() const
Definition: msemstdvector.h:94
_MV::size_type size_type
Definition: msemstdvector.h:37
void resize(size_type _N, const _Ty &_X=_Ty())
Definition: msemstdvector.h:71
bool operator==(const _Myt &_Right) const
_MV::const_pointer const_pointer
Definition: msemstdvector.h:40
void push_back(_Ty &&_X)
Definition: msemstdvector.h:74
std::reverse_iterator< iterator > reverse_iterator
const_reverse_iterator rend() const
vector(const _Myt &_X)
Definition: msemstdvector.h:53
vector(size_type _N)
Definition: msemstdvector.h:50
vector(_Myt &&_X)
Definition: msemstdvector.h:52
vector(const _MV &_X)
Definition: msemstdvector.h:55
_MV::reference back()
Definition: msemstdvector.h:99
const_iterator begin() const
_Myt & operator=(::std::initializer_list< typename _MV::value_type > _Ilist)
Definition: msemstdvector.h:86
_Myt & operator=(_MV &&_X)
Definition: msemstdvector.h:66
iterator emplace(const const_iterator &pos, _Valty &&..._Val)
const_reverse_iterator rbegin() const
iterator insert(const const_iterator &pos, const _Ty *start, const _Ty *end)
_Myt & operator=(const _MV &_X)
Definition: msemstdvector.h:67
#define _XSTD
Definition: msemsevector.h:114
#define _NOEXCEPT
Definition: msemstdvector.h:26
bool move(InputEvent &event)
Definition: commands.cpp:44
bool operator>(const vector< _Ty, _Alloc > &_Left, const vector< _Ty, _Alloc > &_Right)
bool operator<=(const vector< _Ty, _Alloc > &_Left, const vector< _Ty, _Alloc > &_Right)
bool operator>=(const vector< _Ty, _Alloc > &_Left, const vector< _Ty, _Alloc > &_Right)
bool operator!=(const vector< _Ty, _Alloc > &_Left, const vector< _Ty, _Alloc > &_Right)
typename std::enable_if< std::is_convertible< typename std::iterator_traits< _InIter >::iterator_category, std::input_iterator_tag >::value >::type _mse_RequireInputIter
Definition: msemsevector.h:140
long int msev_int
Definition: msemsevector.h:62
size_t msev_size_t
Definition: msemsevector.h:61