7 #ifndef MSEMSTDVECTOR_H
8 #define MSEMSTDVECTOR_H
12 #ifdef MSE_SAFER_SUBSTITUTES_DISABLED
13 #define MSE_MSTDVECTOR_DISABLED
20 #ifdef MSE_MSTDVECTOR_DISABLED
21 template<
class _Ty,
class _A = std::allocator<_Ty> >
using vector = std::vector<_Ty, _A>;
29 template<
class _Ty,
class _A = std::allocator<_Ty> >
58 typedef typename _MV::const_iterator
_It;
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>
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)) {}
79 template<
class ..._Valty>
85 vector(
_XSTD initializer_list<typename _MV::value_type> _Ilist,
const _A& _Al = _A()) :
m_shptr(
std::make_shared<
_MV>(_Ilist, _Al)) {}
87 void assign(
_XSTD initializer_list<typename _MV::value_type> _Ilist) {
m_shptr->assign(_Ilist); }
174 friend class vector<_Ty, _A>;
245 friend class vector<_Ty, _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());
342 m_shptr->insert_before(pos, _X);
345 m_shptr->insert_before(pos, _M, _X);
348 m_shptr->insert_before(pos, _Ilist);
360 template<
class ..._Valty>
372 auto res =
m_shptr->erase(
start.msevector_ss_const_iterator_type(),
end.msevector_ss_const_iterator_type());
393 return (!(_Left == _Right));
398 return (_Right < _Left);
403 return (!(_Right < _Left));
408 return (!(_Left < _Right));
void set_to_const_item_pointer(const ss_const_iterator_type &_Right_cref)
void advance(difference_type n)
msev_size_t position() const
base_class::const_iterator::iterator_category iterator_category
bool points_to_an_item() const
bool points_to_beginning() const
void regress(difference_type n)
const_reference previous_item() const
bool points_to_end_marker() const
bool has_next_item_or_end_marker() const
bool has_previous() const
base_class::iterator::iterator_category iterator_category
void set_to_item_pointer(const ss_iterator_type &_Right_cref)
bool has_previous() const
bool points_to_end_marker() const
void advance(difference_type n)
void regress(difference_type n)
bool has_next_item_or_end_marker() const
bool points_to_beginning() const
bool points_to_an_item() const
msev_size_t position() const
reference previous_item() const
base_class::const_pointer const_pointer
base_class::value_type value_type
base_class::pointer pointer
base_class::const_reference const_reference
base_class::reference reference
_MV::ss_const_iterator_type::pointer pointer
const_iterator(std::shared_ptr< _MV > msevector_shptr)
const_iterator operator++(int)
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 has_previous() const
bool operator>(const const_iterator &_Right) const
bool points_to_beginning() const
const_iterator & operator++()
_MV::ss_const_iterator_type m_ss_const_iterator
msev_size_t position() const
_MV::ss_const_iterator_type::reference reference
bool points_to_an_item() const
_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
bool points_to_end_marker() const
const_iterator & operator--()
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)
const_iterator operator--(int)
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
bool has_next_item_or_end_marker() const
_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 points_to_end_marker() const
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)
bool has_previous() const
_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
bool points_to_an_item() const
void advance(typename _MV::difference_type n)
bool points_to_beginning() const
_MV::const_reference at(size_type _Pos) const
iterator insert_before(const const_iterator &pos, ::std::initializer_list< typename _MV::value_type > _Ilist)
_MV::reference operator[](size_type _P)
_MV::value_type value_type
const_reverse_iterator crend() const
iterator insert_before(const const_iterator &pos, const _Iter &start, const _Iter &end)
size_type max_size() const
vector(size_type _N, const _Ty &_V, const _A &_Al=_A())
vector(_It _F, _It _L, const _A &_Al=_A())
void assign(_It _F, _It _L)
_Myt & operator=(_Myt &&_X)
_MV::const_reference front() const
const_reverse_iterator crbegin() const
void reserve(size_type _Count)
_MV::const_reference back() const
vector(const _Ty *_F, const _Ty *_L, const _A &_Al=_A())
void insert_before(msev_size_t pos, ::std::initializer_list< typename _MV::value_type > _Ilist)
const_iterator cend() const
const_iterator cbegin() const
_MV::allocator_type allocator_type
bool operator<(const _Myt &_Right) const
iterator erase_inclusive(const const_iterator &first, const const_iterator &last)
iterator insert(const const_iterator &pos, const _Iter &start, const _Iter &end)
vector(const std::vector< _Ty > &_X)
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())
_MV::reference at(size_type _Pos)
reverse_iterator rbegin()
iterator erase(const const_iterator &start, const const_iterator &end)
_Myt & operator=(const _Myt &_X)
void insert_before(msev_size_t pos, const _Ty &_X=_Ty())
vector(const _A &_Al=_A())
const_iterator end() const
_MV::const_reference const_reference
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)
mse::mstd::vector< _Ty, _A > _Myt
void assign(const const_iterator &start, const const_iterator &end)
mse::msevector< _Ty, _A > _MV
void insert_before(msev_size_t pos, size_type _M, const _Ty &_X)
void push_back(const _Ty &_X)
vector(::std::initializer_list< typename _MV::value_type > _Ilist, const _A &_Al=_A())
std::reverse_iterator< const_iterator > const_reverse_iterator
const _MV & msevector() const
void assign(::std::initializer_list< typename _MV::value_type > _Ilist)
size_type capacity() const
vector(const const_iterator &start, const const_iterator &end, const _A &_Al=_A())
vector(_Iter _First, _Iter _Last, const _A &_Al)
void emplace_back(_Valty &&..._Val)
_MV::const_reference operator[](size_type _P) const
vector(_Iter _First, _Iter _Last)
vector(std::vector< _Ty > &&_X)
iterator insert_before_inclusive(const const_iterator &pos, const _Iter &first, const _Iter &last)
_MV::difference_type difference_type
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())
void resize(size_type _N, const _Ty &_X=_Ty())
bool operator==(const _Myt &_Right) const
_MV::const_pointer const_pointer
std::reverse_iterator< iterator > reverse_iterator
const_reverse_iterator rend() const
const_iterator begin() const
_Myt & operator=(::std::initializer_list< typename _MV::value_type > _Ilist)
_Myt & operator=(_MV &&_X)
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)
bool move(InputEvent &event)
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