|
|
|
|
| #ifndef _CLI_DEQUE_
|
| #define _CLI_DEQUE_
|
| #include <cliext/iterator>
|
|
|
| namespace cliext {
|
| namespace impl {
|
|
|
|
|
|
|
| template<typename _Value_t>
|
| value struct _Get_sizeof
|
| {
|
| static int value()
|
| {
|
| try
|
| {
|
| return (System::Runtime::InteropServices::Marshal::
|
| SizeOf(_Value_t::typeid));
|
| }
|
| catch (System::Object^)
|
| {
|
| return (4);
|
| }
|
| }
|
| };
|
|
|
| template<typename _Value_t>
|
| value struct _Get_sizeof<_Value_t^>
|
| {
|
| static int value()
|
| {
|
| return (System::Runtime::InteropServices::Marshal::
|
| SizeOf(System::IntPtr::typeid));
|
| }
|
| };
|
|
|
|
|
|
|
|
|
| template<typename _Value_t,
|
| bool _Is_ref>
|
| ref class deque_impl
|
| : public _STLCLR IDeque<_Value_t>
|
| {
|
| public:
|
|
|
| typedef deque_impl<_Value_t, _Is_ref> _Mytype_t;
|
| typedef _STLCLR IDeque<_Value_t> _Mycont_it;
|
| typedef System::Collections::Generic::IEnumerable<_Value_t> _Myenum_it;
|
| typedef cli::array<_Value_t> _Myarray_t;
|
| typedef cli::array<_Myarray_t^> _Mymap_t;
|
| typedef _Cont_make_value<_Value_t, _Is_ref> _Mymake_t;
|
|
|
| typedef RandomAccessIterator<_Mytype_t>
|
| iterator;
|
| typedef ConstRandomAccessIterator<_Mytype_t>
|
| const_iterator;
|
| typedef ReverseRandomAccessIterator<_Mytype_t>
|
| reverse_iterator;
|
| typedef ReverseRandomAccessIterator<_Mytype_t>
|
| const_reverse_iterator;
|
|
|
| typedef int size_type;
|
| typedef int difference_type;
|
| typedef _Value_t value_type;
|
| typedef value_type% reference;
|
| typedef value_type% const_reference;
|
|
|
| typedef _Mycont_it generic_container;
|
| typedef value_type generic_value;
|
| typedef _STLCLR Generic::ContainerRandomAccessIterator<_Value_t>
|
| generic_iterator;
|
| typedef _STLCLR Generic::ReverseRandomAccessIterator<_Value_t>
|
| generic_reverse_iterator;
|
|
|
|
|
| static const int _Maxsize = MAX_CONTAINER_SIZE;
|
| static const int _Mapshift = 5;
|
|
|
|
|
| deque_impl()
|
| {
|
| _Buy(0);
|
| }
|
|
|
| deque_impl(_Mytype_t% _Right)
|
| {
|
| size_type _Count = _Right.size();
|
| size_type _Idx = 0;
|
|
|
| for (_Buy(_Count); _Idx < _Count; ++_Idx)
|
| push_back(_Right.at(_Idx));
|
| }
|
|
|
| explicit deque_impl(size_type _Count)
|
| {
|
| for (_Buy(_Count); 0 < _Count; --_Count)
|
| push_back(value_type());
|
| }
|
|
|
| deque_impl(size_type _Count, value_type _Val)
|
| {
|
| for (_Buy(_Count); 0 < _Count; --_Count)
|
| push_back(_Val);
|
| }
|
|
|
| template<typename _InIt_t>
|
| deque_impl(_InIt_t _First, _InIt_t _Last)
|
| {
|
| _Construct(_First, _Last, _Iter_category(_First));
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Construct(_InIt_t _Count, _InIt_t _Val,
|
| _Int_iterator_tag)
|
| {
|
| if (_Count < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
| for (_Buy((size_type)_Count); 0 < _Count; --_Count)
|
| push_back((value_type)_Val);
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Construct(_InIt_t _First, _InIt_t _Last,
|
| input_iterator_tag)
|
| {
|
| for (_Buy(0); _First != _Last; ++_First)
|
| push_back((value_type)*_First);
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Construct(_InIt_t _First, _InIt_t _Last,
|
| forward_iterator_tag)
|
| {
|
| size_type _Size = cliext::distance(_First, _Last);
|
|
|
| if (_Size < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
| for (_Buy(_Size); 0 < _Size; --_Size, ++_First)
|
| push_back((value_type)*_First);
|
| }
|
|
|
| deque_impl(System::Collections::Generic::IEnumerable<_Value_t>^ _Right)
|
| {
|
| _Buy(0);
|
| for each (value_type _Val in _Right)
|
| push_back(_Val);
|
| }
|
|
|
|
|
| ~deque_impl()
|
| {
|
| clear();
|
| _Mymap = nullptr;
|
| _Mybias = 0;
|
| _Mysize = 0;
|
| ++_Mygen;
|
| }
|
|
|
|
|
| unsigned long get_generation()
|
| {
|
| return (_Mygen);
|
| }
|
|
|
| size_type get_bias(iterator _Where)
|
| {
|
| if (_Where.container() != this)
|
| throw gcnew System::ArgumentException();
|
| return (_Where.get_bias());
|
| }
|
|
|
| bool valid_bias(size_type _Bias)
|
| {
|
| return ((unsigned int)_Bias - begin_bias()
|
| <= (unsigned int)size());
|
| }
|
|
|
| reference at(size_type _Pos)
|
| {
|
| return (at_bias(begin_bias() + _Pos));
|
| }
|
|
|
| reference at_bias(size_type _Bias)
|
| {
|
| if ((unsigned int)size() <= (unsigned int)_Bias - begin_bias())
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| int _Blocksize = 1 << _Blockshift;
|
|
|
| _Bias &= (_Mymap->Length << _Blockshift) - 1;
|
| return (_Mymap[_Bias >> _Blockshift][_Bias & (_Blocksize - 1)]);
|
| }
|
|
|
| int begin_bias()
|
| {
|
| return (_Mybias);
|
| }
|
|
|
| int end_bias()
|
| {
|
| return (begin_bias() + size());
|
| }
|
|
|
| property value_type default[size_type]
|
| {
|
| virtual value_type get(size_type _Pos)
|
| {
|
| return (at(_Pos));
|
| }
|
|
|
| virtual void set(size_type _Pos, value_type _Val)
|
| {
|
| at(_Pos) = _Val;
|
| }
|
| };
|
|
|
| property value_type front_item
|
| {
|
| virtual value_type get()
|
| {
|
| return (front());
|
| }
|
|
|
| virtual void set(value_type _Val)
|
| {
|
| front() = _Val;
|
| }
|
| };
|
|
|
| property value_type back_item
|
| {
|
| virtual value_type get()
|
| {
|
| return (back());
|
| }
|
|
|
| virtual void set(value_type _Val)
|
| {
|
| back() = _Val;
|
| }
|
| };
|
|
|
| reference front()
|
| {
|
| if (empty())
|
| throw gcnew System::NullReferenceException();
|
| return (at(0));
|
| }
|
|
|
| reference back()
|
| {
|
| if (empty())
|
| throw gcnew System::NullReferenceException();
|
| return (at(size() - 1));
|
| }
|
|
|
|
|
| _Myarray_t^ to_array()
|
| {
|
| _Myarray_t^ _Ans = gcnew _Myarray_t(size());
|
|
|
| for (int _Idx = size(); 0 <= --_Idx; )
|
| _Ans[_Idx] = _Mymake_t::make_value(at(_Idx));
|
| return (_Ans);
|
| }
|
|
|
|
|
| iterator make_iterator(size_type _Bias)
|
| {
|
| return (iterator(this, _Bias));
|
| }
|
|
|
| iterator begin()
|
| {
|
| return (make_iterator(begin_bias()));
|
| }
|
|
|
| iterator end()
|
| {
|
| return (make_iterator(end_bias()));
|
| }
|
|
|
| reverse_iterator rbegin()
|
| {
|
| return (reverse_iterator(end()));
|
| }
|
|
|
| reverse_iterator rend()
|
| {
|
| return (reverse_iterator(begin()));
|
| }
|
|
|
|
|
|
|
|
|
|
|
| virtual void resize(size_type _Newsize)
|
| {
|
| resize(_Newsize, value_type());
|
| }
|
|
|
| void resize(size_type _Newsize, value_type _Val)
|
| {
|
| if (_Newsize < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| difference_type _Count = _Newsize - size();
|
|
|
| for (; 0 < _Count; --_Count)
|
| push_back(_Val);
|
| for (; _Count < 0; ++_Count)
|
| pop_back();
|
| }
|
|
|
| size_type size()
|
| {
|
| return (_Mysize);
|
| }
|
|
|
| bool empty()
|
| {
|
| return (size() == 0);
|
| }
|
|
|
|
|
| void push_front(value_type _Val)
|
| {
|
| int _Blocksize = 1 << _Blockshift;
|
|
|
| if ((_Mybias & (_Blocksize - 1)) == 0
|
| && _Mymap->Length <= (_Mysize + _Blocksize) / _Blocksize)
|
| _Growmap();
|
| --_Mybias;
|
|
|
| size_type _Newoff = _Mybias
|
| & ((_Mymap->Length << _Blockshift) - 1);
|
| size_type _Block = _Newoff >> _Blockshift;
|
|
|
| if (_Mymap[_Block] == nullptr)
|
| _Mymap[_Block] = gcnew _Myarray_t(_Blocksize);
|
| _Mymap[_Block][_Newoff & (_Blocksize - 1)] =
|
| _Mymake_t::make_value(_Val);
|
| ++_Mysize;
|
| ++_Mygen;
|
| }
|
|
|
| void pop_front()
|
| {
|
| if (empty())
|
| throw gcnew System::InvalidOperationException();
|
|
|
| _Mymake_t::unmake_value(front());
|
| ++_Mybias;
|
| --_Mysize;
|
| ++_Mygen;
|
| }
|
|
|
| void push_back(value_type _Val)
|
| {
|
| int _Blocksize = 1 << _Blockshift;
|
|
|
| if (((_Mybias + _Mysize) & (_Blocksize - 1)) == 0
|
| && _Mymap->Length <= (_Mysize + _Blocksize) / _Blocksize)
|
| _Growmap();
|
|
|
| size_type _Newoff = (_Mybias + _Mysize)
|
| & ((_Mymap->Length << _Blockshift) - 1);
|
| size_type _Block = _Newoff >> _Blockshift;
|
|
|
| if (_Mymap[_Block] == nullptr)
|
| _Mymap[_Block] = gcnew _Myarray_t(_Blocksize);
|
| _Mymap[_Block][_Newoff & (_Blocksize - 1)] =
|
| _Mymake_t::make_value(_Val);
|
| ++_Mysize;
|
| ++_Mygen;
|
| }
|
|
|
| void pop_back()
|
| {
|
| if (empty())
|
| throw gcnew System::InvalidOperationException();
|
|
|
| _Mymake_t::unmake_value(back());
|
| --_Mysize;
|
| ++_Mygen;
|
| }
|
|
|
| void assign(size_type _Count, value_type _Val)
|
| {
|
| if (_Count < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
| clear();
|
| for (; 0 < _Count; --_Count)
|
| push_back(_Val);
|
| }
|
|
|
| void assign(_STLCLR Generic::IInputIterator<_Value_t>^ _First,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _Last)
|
| {
|
| if (_Iter_container(_First) != this)
|
| clear();
|
|
|
| size_type _Oldsize = size();
|
|
|
| for (; !_First->equal_to(_Last); _First->next())
|
| push_back((value_type)_First->get_cref());
|
| for (; 0 < _Oldsize; --_Oldsize)
|
| pop_front();
|
| }
|
|
|
| void assign(_Myenum_it^ _Right)
|
| {
|
| size_type _Oldsize = size();
|
|
|
| for each (value_type _Val in _Right)
|
| push_back(_Val);
|
| for (; 0 < _Oldsize; --_Oldsize)
|
| pop_front();
|
| }
|
|
|
| void assign(System::Collections::IEnumerable^ _Right)
|
| {
|
| size_type _Oldsize = size();
|
|
|
| for each (value_type _Val in _Right)
|
| push_back(_Val);
|
| for (; 0 < _Oldsize; --_Oldsize)
|
| pop_front();
|
| }
|
|
|
| iterator insert(iterator _Where, value_type _Val)
|
| {
|
| return (make_iterator(
|
| insert_n(get_bias(_Where), 1, _Val)));
|
| }
|
|
|
| void insert(iterator _Where,
|
| size_type _Count, value_type _Val)
|
| {
|
| insert_n(get_bias(_Where), _Count, _Val);
|
| }
|
|
|
| void insert(iterator _Where_iter,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _First,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _Last)
|
| {
|
| size_type _Where = get_bias(_Where_iter);
|
|
|
| if (!valid_bias(_Where))
|
| throw gcnew System::InvalidOperationException();
|
|
|
| if (_First->equal_to(_Last))
|
| ;
|
| else if (_Where - begin_bias() < end_bias() - _Where)
|
| {
|
| size_type _Oldfirst = begin_bias();
|
|
|
| for (; !_First->equal_to(_Last); _First->next())
|
| push_front((value_type)_First->get_cref());
|
|
|
| if (_Oldfirst != _Where)
|
| {
|
| reverse_n(_Oldfirst, _Where);
|
| reverse_n(begin_bias(), _Where);
|
| }
|
| else
|
| reverse_n(begin_bias(), _Oldfirst);
|
| }
|
| else
|
| {
|
| size_type _Oldlast = end_bias();
|
|
|
| for (; !_First->equal_to(_Last); _First->next())
|
| push_back((value_type)_First->get_cref());
|
| if (_Oldlast != _Where)
|
| {
|
| reverse_n(_Where, _Oldlast);
|
| reverse_n(_Oldlast, end_bias());
|
| reverse_n(_Where, end_bias());
|
| }
|
| }
|
| }
|
|
|
| void insert(iterator _Where_iter,
|
| System::Collections::Generic::IEnumerable<_Value_t>^ _Right)
|
| {
|
| size_type _Where = get_bias(_Where_iter);
|
|
|
| if (!valid_bias(_Where))
|
| throw gcnew System::InvalidOperationException();
|
|
|
| if (_Where - begin_bias() < end_bias() - _Where)
|
| {
|
| size_type _Oldfirst = begin_bias();
|
|
|
| for each (value_type _Val in _Right)
|
| push_front(_Val);
|
| if (_Oldfirst != _Where)
|
| {
|
| reverse_n(_Oldfirst, _Where);
|
| reverse_n(begin_bias(), _Where);
|
| }
|
| else
|
| reverse_n(begin_bias(), _Oldfirst);
|
| }
|
| else
|
| {
|
| size_type _Oldlast = end_bias();
|
|
|
| for each (value_type _Val in _Right)
|
| push_back(_Val);
|
| if (_Oldlast != _Where)
|
| {
|
| reverse_n(_Where, _Oldlast);
|
| reverse_n(_Oldlast, end_bias());
|
| reverse_n(_Where, end_bias());
|
| }
|
| }
|
| }
|
|
|
| void insert(iterator _Where_iter,
|
| System::Collections::IEnumerable^ _Right)
|
| {
|
| size_type _Where = get_bias(_Where_iter);
|
|
|
| if (!valid_bias(_Where))
|
| throw gcnew System::InvalidOperationException();
|
|
|
| if (_Where - begin_bias() < end_bias() - _Where)
|
| {
|
| size_type _Oldfirst = begin_bias();
|
|
|
| for each (value_type _Val in _Right)
|
| push_front(_Val);
|
| if (_Oldfirst != _Where)
|
| {
|
| reverse_n(_Oldfirst, _Where);
|
| reverse_n(begin_bias(), _Where);
|
| }
|
| else
|
| reverse_n(begin_bias(), _Oldfirst);
|
| }
|
| else
|
| {
|
| size_type _Oldlast = end_bias();
|
|
|
| for each (value_type _Val in _Right)
|
| push_back(_Val);
|
| if (_Oldlast != _Where)
|
| {
|
| reverse_n(_Where, _Oldlast);
|
| reverse_n(_Oldlast, end_bias());
|
| reverse_n(_Where, end_bias());
|
| }
|
| }
|
| }
|
|
|
| size_type insert_n(size_type _Where,
|
| size_type _Count, value_type _Val)
|
| {
|
| if (_Count < 0 || !valid_bias(_Where))
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| if (_Count == 0)
|
| return (_Where);
|
| else if (_Where - begin_bias() < end_bias() - _Where)
|
| {
|
| size_type _Oldfirst = begin_bias();
|
|
|
| for (; 0 < _Count; --_Count)
|
| push_front(_Val);
|
| if (_Oldfirst != _Where)
|
| {
|
| reverse_n(_Oldfirst, _Where);
|
| reverse_n(begin_bias(), _Where);
|
| }
|
| return (_Where - 1);
|
| }
|
| else
|
| {
|
| size_type _Oldlast = end_bias();
|
| size_type _Ans = _Where + _Count - 1;
|
|
|
| for (; 0 < _Count; --_Count)
|
| push_back(_Val);
|
| if (_Oldlast != _Where)
|
| {
|
| reverse_n(_Where, _Oldlast);
|
| reverse_n(_Where, end_bias());
|
| }
|
| return (_Ans);
|
| }
|
| }
|
|
|
| iterator erase(iterator _Where)
|
| {
|
| size_type _Bias = get_bias(_Where);
|
|
|
| return (make_iterator(erase_n(_Bias, _Bias + 1)));
|
| }
|
|
|
| iterator erase(iterator _First, iterator _Last)
|
| {
|
| return (make_iterator(
|
| erase_n(get_bias(_First), get_bias(_Last))));
|
| }
|
|
|
| size_type erase_n(size_type _First, size_type _Last)
|
| {
|
| if (!valid_bias(_First)
|
| || !valid_bias(_Last)
|
| || _Last < _First)
|
| throw gcnew System::InvalidOperationException();
|
|
|
| if (_First == _Last)
|
| return (_First);
|
| else if (_First - begin_bias() < end_bias() - _Last)
|
| {
|
| size_type _Count = _First - begin_bias();
|
| size_type _Stride = _Last - _First;
|
|
|
| for (_First = _Last - 1; 0 < _Count; --_Count, --_First)
|
| at_bias(_First) = at_bias(_First - _Stride);
|
| for (; 0 < _Stride; --_Stride)
|
| pop_front();
|
| return (_Last);
|
| }
|
| else
|
| {
|
| size_type _Count = end_bias() - _Last;
|
| size_type _Stride = _Last - _First;
|
|
|
| for (; 0 < _Count; --_Count, ++_Last)
|
| at_bias(_Last - _Stride) = at_bias(_Last);
|
| for (; 0 < _Stride; --_Stride)
|
| pop_back();
|
| return (_First);
|
| }
|
| }
|
|
|
| void reverse_n(size_type _First, size_type _Last)
|
| {
|
| if (!valid_bias(_First)
|
| || !valid_bias(_Last)
|
| || _Last < _First)
|
| throw gcnew System::InvalidOperationException();
|
|
|
| for (; _First != _Last && _First != --_Last; ++_First)
|
| {
|
| value_type _Temp = at_bias(_First);
|
|
|
| at_bias(_First) = at_bias(_Last);
|
| at_bias(_Last) = _Temp;
|
| }
|
| }
|
|
|
| void clear()
|
| {
|
| for (; !empty(); )
|
| pop_back();
|
| }
|
|
|
| void swap(_Mytype_t% _Right)
|
| {
|
| if ((System::Object^)this != %_Right)
|
| {
|
| _Mymap_t^ _Tmap = _Mymap;
|
| size_type _Tbias = _Mybias;
|
| size_type _Tsize = _Mysize;
|
|
|
| _Mymap = _Right._Mymap;
|
| _Right._Mymap = _Tmap;
|
|
|
| _Mybias = _Right._Mybias;
|
| _Right._Mybias = _Tbias;
|
|
|
| _Mysize = _Right._Mysize;
|
| _Right._Mysize = _Tsize;
|
|
|
| ++_Mygen;
|
| ++_Right._Mygen;
|
| }
|
| }
|
|
|
|
|
| deque_impl% operator=(deque_impl% _Right)
|
| {
|
| if ((System::Object^)this != %_Right)
|
| {
|
| clear();
|
| for (size_type _Idx = 0; _Idx < _Right.size(); ++_Idx)
|
| push_back(_Right.at(_Idx));
|
| }
|
| return (*this);
|
| }
|
|
|
| _STLCLR_FIELD_ACCESS:
|
| void _Buy(size_type _Capacity)
|
| {
|
| size_type _Valsize = _Get_sizeof<value_type>::value();
|
|
|
| _Blockshift = _Valsize <= 1 ? 6
|
| : _Valsize <= 2 ? 5
|
| : _Valsize <= 4 ? 4
|
| : _Valsize <= 8 ? 3
|
| : _Valsize <= 16 ? 2
|
| : _Valsize <= 32 ? 1
|
| : 0;
|
|
|
| _Mymap = nullptr;
|
| _Mybias = 0;
|
| _Mysize = 0;
|
| _Mygen = 0;
|
| if (_Capacity < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| size_type _Mapsize = 1 << _Mapshift;
|
| size_type _Dequesize = _Mapsize << _Blockshift;
|
|
|
| for (; _Dequesize < _Capacity && _Maxsize - _Dequesize < _Dequesize;
|
| _Mapsize <<= 1, _Dequesize <<= 1)
|
| ;
|
| _Mymap = gcnew _Mymap_t(_Mapsize);
|
| }
|
|
|
| void _Growmap()
|
| {
|
| if (_Maxsize - (_Mymap->Length << _Blockshift)
|
| < (_Mymap->Length << _Blockshift))
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| _Mymap_t^ _Newmap = gcnew _Mymap_t(2 * _Mymap->Length);
|
| size_type _Count = _Mymap->Length;
|
| size_type _Block = _Mybias >> _Blockshift;
|
|
|
| for (; 0 < _Count; --_Count, ++_Block)
|
| _Newmap[_Block % _Newmap->Length] =
|
| _Mymap[_Block % _Mymap->Length];
|
| _Mymap = _Newmap;
|
| }
|
|
|
|
|
| _Mymap_t^ _Mymap;
|
| int _Blockshift;
|
| int _Mybias;
|
| size_type _Mysize;
|
| unsigned long _Mygen;
|
|
|
|
|
| public:
|
| virtual System::Object^ Clone()
|
| {
|
| return (gcnew deque_impl(*this));
|
| }
|
|
|
| private:
|
| property size_type Count
|
| {
|
| virtual size_type get() sealed
|
| = System::Collections::ICollection::Count::get
|
| {
|
| return (size());
|
| }
|
| };
|
|
|
| property bool IsSynchronized
|
| {
|
| virtual bool get() sealed
|
| = System::Collections::ICollection::IsSynchronized::get
|
| {
|
| return (false);
|
| }
|
| };
|
|
|
| property System::Object^ SyncRoot
|
| {
|
| virtual System::Object^ get() sealed
|
| = System::Collections::ICollection::SyncRoot::get
|
| {
|
| return (this);
|
| }
|
| };
|
|
|
| virtual void CopyTo(System::Array^ _Dest_arg, int _First) sealed
|
| = System::Collections::ICollection::CopyTo
|
| {
|
| cli::array<System::Object^>^ _Dest =
|
| (cli::array<System::Object ^>^)_Dest_arg;
|
| for (int _Idx = size(); 0 <= --_Idx; )
|
| {
|
| _Dest[_First + _Idx] = _Mymake_t::make_value(at(_Idx));
|
| }
|
| }
|
|
|
| virtual System::Collections::IEnumerator^ GetEnumerator() sealed
|
| = System::Collections::IEnumerable::GetEnumerator
|
| {
|
| return (gcnew _STLCLR DequeEnumerator<_Value_t>(this, begin_bias()));
|
| }
|
|
|
| virtual unsigned long get_generation_virtual() sealed
|
| = _Mycont_it::get_generation
|
| {
|
| return (get_generation());
|
| }
|
|
|
| virtual bool valid_bias_virtual(size_type _Bias) sealed
|
| = _Mycont_it::valid_bias
|
| {
|
| return (valid_bias(_Bias));
|
| }
|
|
|
| virtual reference at_virtual(size_type _Pos) sealed
|
| = _Mycont_it::at
|
| {
|
| return (at(_Pos));
|
| }
|
|
|
| virtual reference at_bias_virtual(size_type _Bias) sealed
|
| = _Mycont_it::at_bias
|
| {
|
| return (at_bias(_Bias));
|
| }
|
|
|
| virtual int begin_bias_virtual() sealed
|
| = _Mycont_it::begin_bias
|
| {
|
| return (begin_bias());
|
| }
|
|
|
| virtual int end_bias_virtual() sealed
|
| = _Mycont_it::end_bias
|
| {
|
| return (end_bias());
|
| }
|
|
|
| virtual reference front_virtual() sealed
|
| = _Mycont_it::front
|
| {
|
| return (front());
|
| }
|
|
|
| virtual reference back_virtual() sealed
|
| = _Mycont_it::back
|
| {
|
| return (back());
|
| }
|
|
|
|
|
| virtual generic_iterator begin_virtual() sealed
|
| = _Mycont_it::begin
|
| {
|
| return (begin().operator generic_iterator());
|
| }
|
| virtual generic_iterator end_virtual() sealed
|
| = _Mycont_it::end
|
| {
|
| return (end().operator generic_iterator());
|
| }
|
|
|
| virtual generic_reverse_iterator rbegin_virtual() sealed
|
| = _Mycont_it::rbegin
|
| {
|
| return (generic_reverse_iterator(end()));
|
| }
|
|
|
| virtual generic_reverse_iterator rend_virtual() sealed
|
| = _Mycont_it::rend
|
| {
|
| return (generic_reverse_iterator(begin()));
|
| }
|
|
|
|
|
|
|
|
|
|
|
| virtual void resize_virtual(size_type _Newsize) sealed
|
| = _Mycont_it::resize
|
| {
|
| resize(_Newsize);
|
| }
|
|
|
| virtual void resize_virtual(size_type _Newsize, value_type _Val) sealed
|
| = _Mycont_it::resize
|
| {
|
| resize(_Newsize, _Val);
|
| }
|
|
|
| virtual size_type size_virtual() sealed
|
| = _Mycont_it::size
|
| {
|
| return (size());
|
| }
|
|
|
| virtual bool empty_virtual() sealed
|
| = _Mycont_it::empty
|
| {
|
| return (empty());
|
| }
|
|
|
|
|
| virtual void push_front_virtual(value_type _Val) sealed
|
| = _Mycont_it::push_front
|
| {
|
| push_front(_Val);
|
| }
|
|
|
| virtual void pop_front_virtual() sealed
|
| = _Mycont_it::pop_front
|
| {
|
| pop_front();
|
| }
|
|
|
| virtual void push_back_virtual(value_type _Val) sealed
|
| = _Mycont_it::push_back
|
| {
|
| push_back(_Val);
|
| }
|
|
|
| virtual void pop_back_virtual() sealed
|
| = _Mycont_it::pop_back
|
| {
|
| pop_back();
|
| }
|
|
|
| virtual void assign_virtual(size_type _Count, value_type _Val) sealed
|
| = _Mycont_it::assign
|
| {
|
| assign(_Count, _Val);
|
| }
|
|
|
| virtual void assign_virtual(
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _First,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _Last) sealed
|
| = _Mycont_it::assign
|
| {
|
| assign(_First, _Last);
|
| }
|
|
|
| virtual void assign_virtual(
|
| System::Collections::IEnumerable^ _Right) sealed
|
| = _Mycont_it::assign
|
| {
|
| assign(_Right);
|
| }
|
|
|
| virtual generic_iterator insert_virtual(generic_iterator _Where,
|
| value_type _Val) sealed
|
| = _Mycont_it::insert
|
| {
|
| return (insert(iterator(_Where), _Val).operator generic_iterator());
|
| }
|
|
|
| virtual void insert_virtual(generic_iterator _Where,
|
| size_type _Count, value_type _Val) sealed
|
| = _Mycont_it::insert
|
| {
|
| return (insert(iterator(_Where), _Count, _Val));
|
| }
|
|
|
| virtual void insert_virtual(generic_iterator _Where_iter,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _First,
|
| _STLCLR Generic::IInputIterator<_Value_t>^ _Last) sealed
|
| = _Mycont_it::insert
|
| {
|
| insert(iterator(_Where_iter), _First, _Last);
|
| }
|
|
|
| virtual void insert_virtual(generic_iterator _Where_iter,
|
| System::Collections::IEnumerable^ _Right) sealed
|
| = _Mycont_it::insert
|
| {
|
| insert(iterator(_Where_iter), _Right);
|
| }
|
|
|
| virtual generic_iterator erase_virtual(generic_iterator _Where) sealed
|
| = _Mycont_it::erase
|
| {
|
| return (erase(iterator(_Where)).operator generic_iterator());
|
| }
|
|
|
| virtual generic_iterator erase_virtual(generic_iterator _First,
|
| generic_iterator _Last) sealed
|
| = _Mycont_it::erase
|
| {
|
| return (erase(iterator(_First), iterator(_Last)).operator generic_iterator());
|
| }
|
|
|
| virtual void clear_virtual() sealed
|
| = _Mycont_it::clear
|
| {
|
| clear();
|
| }
|
|
|
| virtual void swap_virtual(_Mycont_it^ _Right) sealed
|
| = _Mycont_it::swap
|
| {
|
| swap(*(_Mytype_t^)_Right);
|
| }
|
| };
|
|
|
|
|
|
|
|
|
| template<typename _Value_t,
|
| bool _Is_ref>
|
| ref class deque_base
|
| : public deque_impl<_Value_t, _Is_ref>,
|
| System::Collections::Generic::ICollection<_Value_t>,
|
| System::Collections::Generic::IEnumerable<_Value_t>,
|
| System::Collections::Generic::IList<_Value_t>
|
| {
|
| public:
|
|
|
| typedef deque_base<_Value_t, _Is_ref> _Mytype_t;
|
| typedef deque_impl<_Value_t, _Is_ref> _Mybase_t;
|
| typedef _Cont_make_value<_Value_t, _Is_ref> _Mymake_t;
|
|
|
| typedef typename _Mybase_t::_Myarray_t _Myarray_t;
|
| typedef typename _Mybase_t::_Mycont_it _Mycont_it;
|
| typedef typename _Mybase_t::_Myenum_it _Myenum_it;
|
| typedef typename _Mybase_t::iterator iterator;
|
| typedef typename _Mybase_t::size_type size_type;
|
| typedef typename _Mybase_t::value_type value_type;
|
|
|
|
|
| deque_base()
|
| : _Mybase_t()
|
| {
|
| }
|
|
|
| deque_base(deque_base% _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
| deque_base% operator=(deque_base% _Right)
|
| {
|
| _Mybase_t::operator=(_Right);
|
| return (*this);
|
| }
|
|
|
| operator _Mycont_it^()
|
| {
|
| return (this);
|
| }
|
|
|
|
|
| explicit deque_base(size_type _Count)
|
| : _Mybase_t(_Count)
|
| {
|
| }
|
|
|
| deque_base(size_type _Count, value_type _Val)
|
| : _Mybase_t(_Count, _Val)
|
| {
|
| }
|
|
|
| template<typename _InIt_t>
|
| deque_base(_InIt_t _First, _InIt_t _Last)
|
| : _Mybase_t(_First, _Last)
|
| {
|
| }
|
|
|
| deque_base(_Myenum_it^ _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
|
|
| template<typename _InIt_t>
|
| void assign(_InIt_t _First, _InIt_t _Last)
|
| {
|
| _Assign(_First, _Last, _Iter_category(_First));
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Assign(_InIt_t _Count_arg, _InIt_t _Val,
|
| _Int_iterator_tag%)
|
| {
|
| value_type _Count = (value_type)_Count_arg;
|
|
|
| if (_Count < 0)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
| this->clear();
|
| for (; 0 < _Count; --_Count)
|
| this->push_back((value_type)_Val);
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Assign(_InIt_t _First, _InIt_t _Last,
|
| input_iterator_tag%)
|
| {
|
| if (_Iter_container(_First) != this)
|
| this->clear();
|
|
|
| size_type _Oldsize = this->size();
|
|
|
| for (; _First != _Last; ++_First)
|
| this->push_back((value_type)*_First);
|
| for (; 0 < _Oldsize; --_Oldsize)
|
| this->pop_front();
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Assign(_InIt_t _First, _InIt_t _Last,
|
| random_access_iterator_tag%)
|
| {
|
| if (_Last < _First)
|
| throw gcnew System::ArgumentOutOfRangeException();
|
|
|
| if (_Iter_container(_First) != this)
|
| this->clear();
|
|
|
| size_type _Oldsize = this->size();
|
|
|
| for (; _First != _Last; ++_First)
|
| this->push_back((value_type)*_First);
|
| for (; 0 < _Oldsize; --_Oldsize)
|
| this->pop_front();
|
| }
|
|
|
| template<typename _InIt_t>
|
| void insert(iterator _Where, _InIt_t _First, _InIt_t _Last)
|
| {
|
| _Insert(this->get_bias(_Where), _First, _Last,
|
| _Iter_category(_First));
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Insert(size_type _Where, _InIt_t _First, _InIt_t _Last,
|
| _Int_iterator_tag%)
|
| {
|
| this->insert_n(_Where, (size_type)_First, (value_type)_Last);
|
| }
|
|
|
| template<typename _InIt_t>
|
| void _Insert(size_type _Where, _InIt_t _First, _InIt_t _Last,
|
| input_iterator_tag%)
|
| {
|
| if (!this->valid_bias(_Where))
|
| throw gcnew System::InvalidOperationException();
|
|
|
| if (_First == _Last)
|
| ;
|
| else if (_Where - this->begin_bias() < this->end_bias() - _Where)
|
| {
|
| size_type _Oldfirst = this->begin_bias();
|
|
|
| for (; _First != _Last; ++_First)
|
| this->push_front((value_type)*_First);
|
| if (_Oldfirst != _Where)
|
| {
|
| this->reverse_n(_Oldfirst, _Where);
|
| this->reverse_n(this->begin_bias(), _Where);
|
| }
|
| else
|
| this->reverse_n(this->begin_bias(), _Oldfirst);
|
| }
|
| else
|
| {
|
| size_type _Oldlast = this->end_bias();
|
|
|
| for (; _First != _Last; ++_First)
|
| this->push_back((value_type)*_First);
|
| if (_Oldlast != _Where)
|
| {
|
| this->reverse_n(_Where, _Oldlast);
|
| this->reverse_n(_Oldlast, this->end_bias());
|
| this->reverse_n(_Where, this->end_bias());
|
| }
|
| }
|
| }
|
|
|
|
|
| private:
|
| property size_type Count_generic
|
| {
|
| virtual size_type get() sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::Count::get
|
| {
|
| return (this->size());
|
| }
|
| };
|
|
|
| property bool IsReadOnly
|
| {
|
| virtual bool get() sealed
|
| = System::Collections::Generic::ICollection<_Value_t>
|
| ::IsReadOnly::get
|
| {
|
| return (false);
|
| }
|
| };
|
|
|
| virtual void CopyTo(_Myarray_t^ _Dest, int _First) sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::CopyTo
|
| {
|
| for (int _Idx = this->size(); 0 <= --_Idx; )
|
| {
|
| _Dest[_First + _Idx] = _Mymake_t::make_value(this->at(_Idx));
|
| }
|
| }
|
|
|
| virtual System::Collections::Generic::IEnumerator<_Value_t>^
|
| GetEnumerator() sealed
|
| = System::Collections::Generic::IEnumerable<_Value_t>::GetEnumerator
|
| {
|
| return (gcnew _STLCLR DequeEnumerator<_Value_t>(this, this->begin_bias()));
|
| }
|
|
|
| virtual void Add(value_type _Val) sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::Add
|
| {
|
| this->insert_n(this->begin_bias() + this->size(), 1, _Val);
|
| }
|
|
|
| virtual void Clear() sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::Clear
|
| {
|
| this->clear();
|
| }
|
|
|
| virtual bool Contains(value_type _Val) sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::Contains
|
| {
|
| for (size_type _Idx = 0; _Idx != this->size(); ++_Idx)
|
| if (((System::Object^)_Val)->Equals(
|
| (System::Object^)this->at(_Idx)))
|
| return (true);
|
| return (false);
|
| }
|
|
|
| virtual bool Remove(value_type _Val) sealed
|
| = System::Collections::Generic::ICollection<_Value_t>::Remove
|
| {
|
| for (size_type _Idx = 0; _Idx != this->size(); ++_Idx)
|
| if (((System::Object^)_Val)->Equals(
|
| (System::Object^)this->at(_Idx)))
|
| {
|
| size_type _Bias = this->begin_bias() + _Idx;
|
|
|
| this->erase_n(_Bias, _Bias + 1);
|
| return (true);
|
| }
|
| return (false);
|
| }
|
|
|
| virtual int IndexOf(value_type _Val) sealed
|
| = System::Collections::Generic::IList<_Value_t>::IndexOf
|
| {
|
| int _Idx = 0;
|
|
|
| for (; _Idx < this->size(); ++_Idx)
|
| if (this->at(_Idx) == _Val)
|
| return (_Idx);
|
| return (-1);
|
| }
|
|
|
| virtual void Insert(int _Idx, value_type _Val) sealed
|
| = System::Collections::Generic::IList<_Value_t>::Insert
|
| {
|
| this->insert_n(this->begin_bias() + _Idx, 1, _Val);
|
| }
|
|
|
| virtual void RemoveAt(int _Idx) sealed
|
| = System::Collections::Generic::IList<_Value_t>::RemoveAt
|
| {
|
| this->erase_n(this->begin_bias() + _Idx, this->begin_bias() + _Idx + 1);
|
| }
|
| };
|
|
|
|
|
|
|
|
|
| template<typename _Value_t,
|
| bool _Is_ref>
|
| ref class deque_select
|
| : public deque_base<_Value_t, _Is_ref>
|
| {
|
| public:
|
|
|
| typedef _Value_t _Gvalue_t;
|
|
|
| typedef deque_select<_Value_t, _Is_ref> _Mytype_t;
|
| typedef deque_base<_Gvalue_t, _Is_ref> _Mybase_t;
|
|
|
| typedef typename _Mybase_t::_Myenum_it _Myenum_it;
|
| typedef typename _Mybase_t::size_type size_type;
|
|
|
| typedef _Value_t value_type;
|
| typedef value_type% reference;
|
| typedef value_type% const_reference;
|
|
|
|
|
| deque_select()
|
| : _Mybase_t()
|
| {
|
| }
|
|
|
| deque_select(deque_select% _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
| deque_select% operator=(deque_select% _Right)
|
| {
|
| _Mybase_t::operator=(_Right);
|
| return (*this);
|
| }
|
|
|
|
|
| explicit deque_select(size_type _Count)
|
| : _Mybase_t(_Count)
|
| {
|
| }
|
|
|
| deque_select(size_type _Count, value_type _Val)
|
| : _Mybase_t(_Count, _Val)
|
| {
|
| }
|
|
|
| template<typename _InIt_t>
|
| deque_select(_InIt_t _First, _InIt_t _Last)
|
| : _Mybase_t(_First, _Last)
|
| {
|
| }
|
|
|
| deque_select(_Myenum_it^ _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
| };
|
|
|
|
|
|
|
|
|
| template<typename _Value_t>
|
| ref class deque_select<_Value_t, true>
|
| : public deque_base<_Value_t^, true>
|
| {
|
| public:
|
|
|
| typedef _Value_t^ _Gvalue_t;
|
|
|
| typedef deque_select<_Value_t, true> _Mytype_t;
|
| typedef deque_base<_Gvalue_t, true> _Mybase_t;
|
|
|
| typedef typename _Mybase_t::_Myenum_it _Myenum_it;
|
| typedef typename _Mybase_t::iterator iterator;
|
| typedef typename _Mybase_t::size_type size_type;
|
|
|
| typedef _Value_t value_type;
|
| typedef value_type% reference;
|
| typedef value_type% const_reference;
|
|
|
|
|
| deque_select()
|
| : _Mybase_t()
|
| {
|
| }
|
|
|
| deque_select(deque_select% _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
| deque_select% operator=(deque_select% _Right)
|
| {
|
| _Mybase_t::operator=(_Right);
|
| return (*this);
|
| }
|
|
|
|
|
| explicit deque_select(size_type _Count)
|
| {
|
| resize(_Count);
|
| }
|
|
|
| deque_select(size_type _Count, value_type _Val)
|
| {
|
| resize(_Count, _Val);
|
| }
|
|
|
| template<typename _InIt_t>
|
| deque_select(_InIt_t _First, _InIt_t _Last)
|
| : _Mybase_t(_First, _Last)
|
| {
|
| }
|
|
|
| deque_select(_Myenum_it^ _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
|
|
| virtual void resize(size_type _Newsize) override
|
| {
|
| value_type _Val;
|
|
|
| _Mybase_t::resize(_Newsize, %_Val);
|
| }
|
|
|
| void resize(size_type _Newsize, value_type _Val)
|
| {
|
| _Mybase_t::resize(_Newsize, %_Val);
|
| }
|
|
|
|
|
| reference at(size_type _Pos) new
|
| {
|
| return (*_Mybase_t::at(_Pos));
|
| }
|
|
|
| property value_type default[size_type]
|
| {
|
| virtual value_type get(size_type _Pos)
|
| {
|
| return (*_Mybase_t::at(_Pos));
|
| }
|
|
|
| virtual void set(size_type _Pos, value_type _Val)
|
| {
|
| _Mybase_t::at(_Pos) = gcnew value_type(_Val);
|
| }
|
| };
|
|
|
| property value_type front_item
|
| {
|
| virtual value_type get()
|
| {
|
| return (*_Mybase_t::front_item);
|
| }
|
|
|
| virtual void set(value_type _Val)
|
| {
|
| _Mybase_t::front_item = gcnew value_type(_Val);
|
| }
|
| };
|
|
|
| property value_type back_item
|
| {
|
| virtual value_type get()
|
| {
|
| return (*_Mybase_t::back_item);
|
| }
|
|
|
| virtual void set(value_type _Val)
|
| {
|
| _Mybase_t::back_item = gcnew value_type(_Val);
|
| }
|
| };
|
|
|
| reference front() new
|
| {
|
| return (*_Mybase_t::front());
|
| }
|
|
|
| reference back() new
|
| {
|
| return (*_Mybase_t::back());
|
| }
|
|
|
|
|
| void push_front(value_type _Val)
|
| {
|
| _Mybase_t::push_front(%_Val);
|
| }
|
|
|
| void push_back(value_type _Val)
|
| {
|
| _Mybase_t::push_back(%_Val);
|
| }
|
|
|
| void assign(size_type _Count, value_type _Val)
|
| {
|
| _Mybase_t::assign(_Count, %_Val);
|
| }
|
|
|
| iterator insert(iterator _Where, value_type _Val)
|
| {
|
| return (_Mybase_t::insert(_Where, %_Val));
|
| }
|
|
|
| void insert(iterator _Where,
|
| size_type _Count, value_type _Val)
|
| {
|
| return (_Mybase_t::insert(_Where, _Count, %_Val));
|
| }
|
| };
|
| }
|
|
|
|
|
|
|
|
|
| template<typename _Value_t>
|
| ref class deque
|
| : public impl::deque_select<_Value_t,
|
| __is_ref_class(typename _Dehandle<_Value_t>::type)
|
| && !is_handle<_Value_t>::value>
|
| {
|
| public:
|
|
|
| typedef deque<_Value_t> _Mytype_t;
|
| typedef impl::deque_select<_Value_t,
|
| __is_ref_class(typename _Dehandle<_Value_t>::type)
|
| && !is_handle<_Value_t>::value> _Mybase_t;
|
|
|
| typedef typename _Mybase_t::_Myenum_it _Myenum_it;
|
| typedef typename _Mybase_t::size_type size_type;
|
| typedef typename _Mybase_t::value_type value_type;
|
|
|
|
|
| deque()
|
| : _Mybase_t()
|
| {
|
| }
|
|
|
| deque(deque% _Right)
|
| : _Mybase_t((_Mybase_t%)_Right)
|
| {
|
| }
|
|
|
| deque(deque^ _Right)
|
| : _Mybase_t((_Mybase_t%)*_Right)
|
| {
|
| }
|
|
|
| deque% operator=(deque% _Right)
|
| {
|
| _Mybase_t::operator=(_Right);
|
| return (*this);
|
| }
|
|
|
| deque% operator=(deque^ _Right)
|
| {
|
| _Mybase_t::operator=(*_Right);
|
| return (*this);
|
| }
|
|
|
|
|
| explicit deque(size_type _Count)
|
| : _Mybase_t(_Count)
|
| {
|
| }
|
|
|
| deque(size_type _Count, value_type _Val)
|
| : _Mybase_t(_Count, _Val)
|
| {
|
| }
|
|
|
| template<typename _InIt_t>
|
| deque(_InIt_t _First, _InIt_t _Last)
|
| : _Mybase_t(_First, _Last)
|
| {
|
| }
|
|
|
| deque(_Myenum_it^ _Right)
|
| : _Mybase_t(_Right)
|
| {
|
| }
|
|
|
|
|
| void swap(deque% _Right)
|
| {
|
| _Mybase_t::swap(_Right);
|
| }
|
|
|
|
|
| virtual System::Object^ Clone() override
|
| {
|
| return (gcnew _Mytype_t(*this));
|
| }
|
| };
|
|
|
|
|
|
|
|
|
| template<typename _Value_t> inline
|
| bool operator==(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| typename deque<_Value_t>::size_type _Size = _Left.size();
|
|
|
| if (_Size != _Right.size())
|
| return (false);
|
| else
|
| {
|
| for (int _Idx = 0; _Idx != _Size; ++_Idx)
|
| if (_Left.at(_Idx) != _Right.at(_Idx))
|
| return (false);
|
| return (true);
|
| }
|
| }
|
|
|
| template<typename _Value_t> inline
|
| bool operator!=(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| return (!(_Left == _Right));
|
| }
|
|
|
| template<typename _Value_t> inline
|
| bool operator<(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| typename deque<_Value_t>::size_type _Idx = 0;
|
|
|
| for (; _Idx != _Left.size() && _Idx != _Right.size(); ++_Idx)
|
| if (_Left.at(_Idx) < _Right.at(_Idx))
|
| return (true);
|
| else if (_Right.at(_Idx) < _Left.at(_Idx))
|
| return (false);
|
| return (_Idx == _Left.size() && _Idx != _Right.size());
|
| }
|
|
|
| template<typename _Value_t> inline
|
| bool operator>=(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| return (!(_Left < _Right));
|
| }
|
|
|
| template<typename _Value_t> inline
|
| bool operator>(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| return (_Right < _Left);
|
| }
|
|
|
| template<typename _Value_t> inline
|
| bool operator<=(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| return (!(_Right < _Left));
|
| }
|
|
|
|
|
|
|
|
|
| template<typename _Value_t> inline
|
| void swap(deque<_Value_t>% _Left,
|
| deque<_Value_t>% _Right)
|
| {
|
| _Left.swap(_Right);
|
| }
|
| }
|
| #endif
|
|
|