29#if !defined (_STLP_INTERNAL_VECTOR_H)
39template <
class _Tp,
class _Alloc>
43template <
class _Tp,
class _Alloc>
47#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
48# define vector _STLP_PTR_IMPL_NAME(vector)
49#elif defined (_STLP_DEBUG)
50# define vector _STLP_NON_DBG_NAME(vector)
55#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
56# define __iterator__ _Tp*
58# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE vector<_Tp, _Alloc>::iterator
61template <
class _Tp,
class _Alloc>
63 if (capacity() <
__n) {
65 this->_M_throw_length_error();
71 __tmp = _M_allocate_and_copy(
__n, this->_M_start, this->_M_finish);
74 __tmp = this->_M_end_of_storage.allocate(
__n,
__n);
76 _M_set(__tmp, __tmp + __old_size, __tmp +
__n);
80template <
class _Tp,
class _Alloc>
84#if !defined (_STLP_NO_MOVE_SEMANTIC)
87 size_type __len = _M_compute_next_size(__fill_len);
88 pointer __new_start = this->_M_end_of_storage.allocate(__len, __len);
89 pointer __new_finish = __new_start;
93 if (__fill_len == 1) {
101 _STLP_UNWIND((_STLP_STD::_Destroy_Range(__new_start,__new_finish),
102 this->_M_end_of_storage.deallocate(__new_start,__len)))
103 _M_clear_after_move();
104 _M_set(__new_start, __new_finish, __new_start + __len);
107template <
class _Tp,
class _Alloc>
110 size_type __len = _M_compute_next_size(__fill_len);
111 pointer __new_start = this->_M_end_of_storage.allocate(__len, __len);
118 _M_set(__new_start, __new_finish, __new_start + __len);
121template <
class _Tp,
class _Alloc>
124 if (_M_is_inside(__x)) {
129 iterator __src = this->_M_finish - 1;
131 for (; __src >= __pos; --__dst, --__src) {
132 _STLP_STD::_Move_Construct(__dst, *__src);
133 _STLP_STD::_Destroy_Moved(__src);
136 this->_M_finish +=
__n;
139template <
class _Tp,
class _Alloc>
145 if (_M_is_inside(__x)) {
150 const size_type __elems_after = this->_M_finish - __pos;
151 pointer __old_finish = this->_M_finish;
152 if (__elems_after >
__n) {
154 this->_M_finish +=
__n;
156 _STLP_STD::fill(__pos, __pos +
__n, __x);
160 this->_M_finish += __elems_after;
161 _STLP_STD::fill(__pos, __old_finish, __x);
165template <
class _Tp,
class _Alloc>
168#if !defined (_STLP_NO_MOVE_SEMANTIC)
172 if (
size_type(this->_M_end_of_storage._M_data - this->_M_finish) >=
__n) {
173 _M_fill_insert_aux(__pos,
__n, __x, _Movable());
181template <
class _Tp,
class _Alloc>
187 if (__xlen > capacity()) {
192 this->_M_start = __tmp;
193 this->_M_end_of_storage._M_data = this->_M_start + __len;
194 }
else if (
size() >= __xlen) {
197 _STLP_STD::_Destroy_Range(__i, this->_M_finish);
204 this->_M_finish = this->_M_start + __xlen;
209template <
class _Tp,
class _Alloc>
211 if (
__n > capacity()) {
221template <
class _Tp,
class _Alloc>
225 _M_fill_insert(__pos, 1, __x);
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
void * __copy_trivial(const void *__first, const void *__last, void *__result)
_OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP _OutputIter __fill_n(_OutputIter __first, _Size __n, const _Tp &__val)
void _Copy_Construct(_Tp *__p, const _Tp &__val)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_out_of_range(const char *__msg)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_length_error(const char *__msg)
_OutputIter __ucopy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type &)
_ForwardIter __uninitialized_move(_InputIter __first, _InputIter __last, _ForwardIter __result, _TrivialUCpy __trivial_ucpy, const __false_type &)
_ForwardIter __uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp &__x)
void _STLP_FUNCTION_THROWS _M_throw_length_error() const
void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const
#define _STLP_UNWIND(action)
#define _STLP_MOVE_TO_STD_NAMESPACE
#define __STATIC_CAST(__x, __y)
#define __CONST_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
GLsizei const GLvoid * pointer
void _M_fill_insert(iterator __pos, size_type __n, const _Tp &__x)
void _M_insert_overflow_aux(pointer __pos, const _Tp &__x, const __false_type &, size_type __fill_len, bool __atend)
void reserve(size_type __n)
const value_type * const_pointer
void _M_insert_overflow(pointer __pos, const _Tp &__x, const __false_type &, size_type __fill_len, bool __atend=false)
_Self & operator=(const _Self &__x)
iterator insert(iterator __pos, const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
void _M_fill_insert_aux(iterator __pos, size_type __n, const _Tp &__x, const __true_type &)
void _M_fill_assign(size_type __n, const _Tp &__val)