vector Class Reference

class vector
Public Member Functions
vector(const allocator_type &)
vector(size_type)
vector(size_type, const _Tp &, const allocator_type &)
vector(const _Self &)
vector(__move_source< _Self >)
vector(_InputIterator, _InputIterator, const allocator_type &__a)
~vector()
void_M_assign_aux(_ForwardIter, _ForwardIter, const forward_iterator_tag &)
void_M_assign_aux(_InputIter, _InputIter, const input_iterator_tag &)
void_M_assign_dispatch(_Integer, _Integer, const __true_type &)
void_M_assign_dispatch(_InputIter, _InputIter, const __false_type &)
void_M_fill_assign(size_type, const _Tp &)
voidassign(size_type, const _Tp &)
voidassign(_InputIterator, _InputIterator)
reference at(size_type)
const_reference at(size_type)
reference back()
const_reference back()
iterator begin()
const_iterator begin()
size_type capacity()
voidclear()
boolempty()
iterator end()
const_iterator end()
iterator erase(iterator)
iterator erase(iterator, iterator)
reference front()
const_reference front()
allocator_type get_allocator()
iterator insert(iterator, const _Tp &)
voidinsert(iterator, _InputIterator, _InputIterator)
voidinsert(iterator, size_type, const _Tp &)
size_type max_size()
_Self &operator=(const _Self &)
reference operator[](size_type)
const_reference operator[](size_type)
voidpop_back()
voidpush_back(const _Tp &)
reverse_iterator rbegin()
const_reverse_iteratorrbegin()
reverse_iterator rend()
const_reverse_iteratorrend()
voidreserve(size_type)
voidresize(size_type, const _Tp &)
size_type size()
voidswap(_Self &)
Private Member Functions
pointer _M_allocate_and_copy(size_type &, _ForwardIterator, _ForwardIterator)
void_M_clear()
void_M_clear_after_move()
iterator _M_erase(iterator, const __true_type &)
iterator _M_erase(iterator, const __false_type &)
iterator _M_erase(iterator, iterator, const __true_type &)
iterator _M_erase(iterator, iterator, const __false_type &)
void_M_fill_insert(iterator, size_type, const _Tp &)
void_M_fill_insert_aux(iterator, size_type, const _Tp &, const __true_type &)
void_M_fill_insert_aux(iterator, size_type, const _Tp &, const __false_type &)
void_M_initialize(size_type, const _Tp &)
void_M_initialize_aux(_Integer, _Integer, const __true_type &)
void_M_initialize_aux(_InputIterator, _InputIterator, const __false_type &)
void_M_insert_dispatch(iterator, _Integer, _Integer, const __true_type &)
void_M_insert_dispatch(iterator, _InputIterator, _InputIterator, const __false_type &)
void_M_insert_overflow(pointer, const _Tp &, const __false_type &, size_type, bool)
void_M_insert_overflow(pointer, const _Tp &, const __true_type &, size_type, bool)
void_M_insert_overflow_aux(pointer, const _Tp &, const __false_type &, size_type, bool)
void_M_insert_overflow_aux(pointer, const _Tp &, const __true_type &, size_type, bool)
bool_M_is_inside(const value_type &)
void_M_range_check(size_type)
void_M_range_initialize(_InputIterator, _InputIterator, const input_iterator_tag &)
void_M_range_initialize(_ForwardIterator, _ForwardIterator, const forward_iterator_tag &)
void_M_range_insert(iterator, _InputIterator, _InputIterator, const input_iterator_tag &)
void_M_range_insert(iterator, _ForwardIterator, _ForwardIterator, const forward_iterator_tag &)
void_M_range_insert_aux(iterator, _ForwardIterator, _ForwardIterator, size_type, const __true_type &)
void_M_range_insert_aux(iterator, _ForwardIterator, _ForwardIterator, size_type, const __false_type &)
void_M_range_insert_realloc(iterator, _ForwardIterator, _ForwardIterator, size_type)
void_M_set(pointer, pointer, pointer)
Public Member Type Definitions
typedef random_access_iterator_tag _Iterator_category
typedef_Base::allocator_type allocator_type
typedefconst value_type * const_iterator
typedefconst value_type * const_pointer
typedefconst value_type & const_reference
typedef ptrdiff_t difference_type
typedef value_type * iterator
typedef value_type * pointer
typedef value_type & reference
typedef size_t size_type
typedef_Tp value_type
Private Member Type Definitions
typedef_STLP_PRIV _Vector_base< _Tp, _Alloc > _Base
typedef __move_traits< _Tp >::implemented _Movable
typedef vector< _Tp, _Alloc > _Self
typedef __type_traits< _Tp >::has_trivial_assignment_operator _TrivialCopy
typedef __type_traits< _Tp >::has_trivial_copy_constructor _TrivialUCopy
Public Attributes
_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

Constructor & Destructor Documentation

vector(const allocator_type &)

vector(const allocator_type &__a =  allocator_type())[inline, explicit]

Parameters

const allocator_type & __a =  allocator_type()

vector(size_type)

vector(size_type__n)[inline, explicit]

Parameters

size_type __n

vector(size_type, const _Tp &, const allocator_type &)

vector(size_type__n,
const _Tp &__val,
const allocator_type &__a =  allocator_type()
)[inline]

Parameters

size_type __n
const _Tp & __val
const allocator_type & __a =  allocator_type()

vector(const _Self &)

vector(const _Self &__x)[inline]

Parameters

const _Self & __x

vector(__move_source< _Self >)

vector(__move_source< _Self >src)[inline]

Parameters

__move_source< _Self > src

vector(_InputIterator, _InputIterator, const allocator_type &__a)

vector(_InputIterator__first,
_InputIterator__last,
const allocator_type &__a_STLP_ALLOCATOR_TYPE_DFL
)[inline]

Parameters

_InputIterator __first
_InputIterator __last
const allocator_type &__a _STLP_ALLOCATOR_TYPE_DFL

~vector()

~vector()[inline]

Member Functions Documentation

_M_allocate_and_copy(size_type &, _ForwardIterator, _ForwardIterator)

pointer _M_allocate_and_copy(size_type &__n,
_ForwardIterator__first,
_ForwardIterator__last
)[private, inline]

Parameters

size_type & __n
_ForwardIterator __first
_ForwardIterator __last

_M_assign_aux(_ForwardIter, _ForwardIter, const forward_iterator_tag &)

void_M_assign_aux(_ForwardIter__first,
_ForwardIter__last,
const forward_iterator_tag &
)[inline]

Parameters

_ForwardIter __first
_ForwardIter __last
const forward_iterator_tag &

_M_assign_aux(_InputIter, _InputIter, const input_iterator_tag &)

void_M_assign_aux(_InputIter__first,
_InputIter__last,
const input_iterator_tag &
)[inline]

Parameters

_InputIter __first
_InputIter __last
const input_iterator_tag &

_M_assign_dispatch(_Integer, _Integer, const __true_type &)

void_M_assign_dispatch(_Integer__n,
_Integer__val,
const __true_type &
)[inline]

Parameters

_Integer __n
_Integer __val
const __true_type &

_M_assign_dispatch(_InputIter, _InputIter, const __false_type &)

void_M_assign_dispatch(_InputIter__first,
_InputIter__last,
const __false_type &
)[inline]

Parameters

_InputIter __first
_InputIter __last
const __false_type &

_M_clear()

void_M_clear()[private, inline]

_M_clear_after_move()

void_M_clear_after_move()[private, inline]

_M_erase(iterator, const __true_type &)

iterator _M_erase(iterator__pos,
const __true_type &
)[private, inline]

Parameters

iterator __pos
const __true_type &

_M_erase(iterator, const __false_type &)

iterator _M_erase(iterator__pos,
const __false_type &
)[private, inline]

Parameters

iterator __pos
const __false_type &

_M_erase(iterator, iterator, const __true_type &)

iterator _M_erase(iterator__first,
iterator__last,
const __true_type &
)[private, inline]

Parameters

iterator __first
iterator __last
const __true_type &

_M_erase(iterator, iterator, const __false_type &)

iterator _M_erase(iterator__first,
iterator__last,
const __false_type &
)[private, inline]

Parameters

iterator __first
iterator __last
const __false_type &

_M_fill_assign(size_type, const _Tp &)

void_M_fill_assign(size_type__n,
const _Tp &__val
)

Parameters

size_type __n
const _Tp & __val

_M_fill_insert(iterator, size_type, const _Tp &)

void_M_fill_insert(iterator__pos,
size_type__n,
const _Tp &__x
)[private]

Parameters

iterator __pos
size_type __n
const _Tp & __x

_M_fill_insert_aux(iterator, size_type, const _Tp &, const __true_type &)

void_M_fill_insert_aux(iterator__pos,
size_type__n,
const _Tp &__x,
const __true_type &
)[private]

Parameters

iterator __pos
size_type __n
const _Tp & __x
const __true_type &

_M_fill_insert_aux(iterator, size_type, const _Tp &, const __false_type &)

void_M_fill_insert_aux(iterator__pos,
size_type__n,
const _Tp &__x,
const __false_type &
)[private]

Parameters

iterator __pos
size_type __n
const _Tp & __x
const __false_type &

_M_initialize(size_type, const _Tp &)

void_M_initialize(size_type__n,
const _Tp &__val = _Tp()
)[private, inline]

Parameters

size_type __n
const _Tp & __val = _Tp()

_M_initialize_aux(_Integer, _Integer, const __true_type &)

void_M_initialize_aux(_Integer__n,
_Integer__val,
const __true_type &
)[private, inline]

Parameters

_Integer __n
_Integer __val
const __true_type &

_M_initialize_aux(_InputIterator, _InputIterator, const __false_type &)

void_M_initialize_aux(_InputIterator__first,
_InputIterator__last,
const __false_type &
)[private, inline]

Parameters

_InputIterator __first
_InputIterator __last
const __false_type &

_M_insert_dispatch(iterator, _Integer, _Integer, const __true_type &)

void_M_insert_dispatch(iterator__pos,
_Integer__n,
_Integer__val,
const __true_type &
)[private, inline]

Parameters

iterator __pos
_Integer __n
_Integer __val
const __true_type &

_M_insert_dispatch(iterator, _InputIterator, _InputIterator, const __false_type &)

void_M_insert_dispatch(iterator__pos,
_InputIterator__first,
_InputIterator__last,
const __false_type &
)[private, inline]

Parameters

iterator __pos
_InputIterator __first
_InputIterator __last
const __false_type &

_M_insert_overflow(pointer, const _Tp &, const __false_type &, size_type, bool)

void_M_insert_overflow(pointer__pos,
const _Tp &__x,
const __false_type &,
size_type__fill_len,
bool__atend = false
)[private, inline]

Parameters

pointer __pos
const _Tp & __x
const __false_type &
size_type __fill_len
bool __atend = false

_M_insert_overflow(pointer, const _Tp &, const __true_type &, size_type, bool)

void_M_insert_overflow(pointer__pos,
const _Tp &__x,
const __true_type &,
size_type__fill_len,
bool__atend = false
)[private]

Parameters

pointer __pos
const _Tp & __x
const __true_type &
size_type __fill_len
bool __atend = false

_M_insert_overflow_aux(pointer, const _Tp &, const __false_type &, size_type, bool)

void_M_insert_overflow_aux(pointer__pos,
const _Tp &__x,
const __false_type &,
size_type__fill_len,
bool__atend
)[private]

Parameters

pointer __pos
const _Tp & __x
const __false_type &
size_type __fill_len
bool __atend

_M_insert_overflow_aux(pointer, const _Tp &, const __true_type &, size_type, bool)

void_M_insert_overflow_aux(pointer__pos,
const _Tp &__x,
const __true_type &,
size_type__fill_len,
bool__atend
)[private, inline]

Parameters

pointer __pos
const _Tp & __x
const __true_type &
size_type __fill_len
bool __atend

_M_is_inside(const value_type &)

bool_M_is_inside(const value_type &__x)const [private, inline]

Parameters

const value_type & __x

_M_range_check(size_type)

void_M_range_check(size_type__n)const [private, inline]

Parameters

size_type __n

_M_range_initialize(_InputIterator, _InputIterator, const input_iterator_tag &)

void_M_range_initialize(_InputIterator__first,
_InputIterator__last,
const input_iterator_tag &
)[private, inline]

Parameters

_InputIterator __first
_InputIterator __last
const input_iterator_tag &

_M_range_initialize(_ForwardIterator, _ForwardIterator, const forward_iterator_tag &)

void_M_range_initialize(_ForwardIterator__first,
_ForwardIterator__last,
const forward_iterator_tag &
)[private, inline]

Parameters

_ForwardIterator __first
_ForwardIterator __last
const forward_iterator_tag &

_M_range_insert(iterator, _InputIterator, _InputIterator, const input_iterator_tag &)

void_M_range_insert(iterator__pos,
_InputIterator__first,
_InputIterator__last,
const input_iterator_tag &
)[private, inline]

Parameters

iterator __pos
_InputIterator __first
_InputIterator __last
const input_iterator_tag &

_M_range_insert(iterator, _ForwardIterator, _ForwardIterator, const forward_iterator_tag &)

void_M_range_insert(iterator__pos,
_ForwardIterator__first,
_ForwardIterator__last,
const forward_iterator_tag &
)[private, inline]

Parameters

iterator __pos
_ForwardIterator __first
_ForwardIterator __last
const forward_iterator_tag &

_M_range_insert_aux(iterator, _ForwardIterator, _ForwardIterator, size_type, const __true_type &)

void_M_range_insert_aux(iterator__pos,
_ForwardIterator__first,
_ForwardIterator__last,
size_type__n,
const __true_type &
)[private, inline]

Parameters

iterator __pos
_ForwardIterator __first
_ForwardIterator __last
size_type __n
const __true_type &

_M_range_insert_aux(iterator, _ForwardIterator, _ForwardIterator, size_type, const __false_type &)

void_M_range_insert_aux(iterator__pos,
_ForwardIterator__first,
_ForwardIterator__last,
size_type__n,
const __false_type &
)[private, inline]

Parameters

iterator __pos
_ForwardIterator __first
_ForwardIterator __last
size_type __n
const __false_type &

_M_range_insert_realloc(iterator, _ForwardIterator, _ForwardIterator, size_type)

void_M_range_insert_realloc(iterator__pos,
_ForwardIterator__first,
_ForwardIterator__last,
size_type__n
)[private, inline]

Parameters

iterator __pos
_ForwardIterator __first
_ForwardIterator __last
size_type __n

_M_set(pointer, pointer, pointer)

void_M_set(pointer__s,
pointer__f,
pointer__e
)[private, inline]

Parameters

pointer __s
pointer __f
pointer __e

assign(size_type, const _Tp &)

voidassign(size_type__n,
const _Tp &__val
)[inline]

Parameters

size_type __n
const _Tp & __val

assign(_InputIterator, _InputIterator)

voidassign(_InputIterator__first,
_InputIterator__last
)[inline]

Parameters

_InputIterator __first
_InputIterator __last

at(size_type)

reference at(size_type__n)[inline]

Parameters

size_type __n

at(size_type)

const_reference at(size_type__n)const [inline]

Parameters

size_type __n

back()

reference back()[inline]

back()

const_reference back()const [inline]

begin()

iterator begin()[inline]

begin()

const_iterator begin()const [inline]

capacity()

size_type capacity()const [inline]

clear()

voidclear()[inline]

empty()

boolempty()const [inline]

end()

iterator end()[inline]

end()

const_iterator end()const [inline]

erase(iterator)

iterator erase(iterator__pos)[inline]

Parameters

iterator __pos

erase(iterator, iterator)

iterator erase(iterator__first,
iterator__last
)[inline]

Parameters

iterator __first
iterator __last

front()

reference front()[inline]

front()

const_reference front()const [inline]

get_allocator()

allocator_type get_allocator()const [inline]

insert(iterator, const _Tp &)

iterator insert(iterator__pos,
const _Tp &__x = _Tp()
)

Parameters

iterator __pos
const _Tp & __x = _Tp()

insert(iterator, _InputIterator, _InputIterator)

voidinsert(iterator__pos,
_InputIterator__first,
_InputIterator__last
)[inline]

Parameters

iterator __pos
_InputIterator __first
_InputIterator __last

insert(iterator, size_type, const _Tp &)

voidinsert(iterator__pos,
size_type__n,
const _Tp &__x
)[inline]

Parameters

iterator __pos
size_type __n
const _Tp & __x

max_size()

size_type max_size()const [inline]

operator=(const _Self &)

_Self &operator=(const _Self &__x)

Parameters

const _Self & __x

operator[](size_type)

reference operator[](size_type__n)[inline]

Parameters

size_type __n

operator[](size_type)

const_reference operator[](size_type__n)const [inline]

Parameters

size_type __n

pop_back()

voidpop_back()[inline]

push_back(const _Tp &)

voidpush_back(const _Tp &__x = _Tp())[inline]

Parameters

const _Tp & __x = _Tp()

rbegin()

reverse_iterator rbegin()[inline]

rbegin()

const_reverse_iteratorrbegin()const [inline]

rend()

reverse_iterator rend()[inline]

rend()

const_reverse_iteratorrend()const [inline]

reserve(size_type)

voidreserve(size_type__n)

Parameters

size_type __n

resize(size_type, const _Tp &)

voidresize(size_type__new_size,
const _Tp &__x = _Tp()
)[inline]

Parameters

size_type __new_size
const _Tp & __x = _Tp()

size()

size_type size()const [inline]

swap(_Self &)

voidswap(_Self &__x)[inline]

_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS

Parameters

_Self & __x

Member Type Definitions Documentation

Typedef _Base

typedef _STLP_PRIV _Vector_base< _Tp, _Alloc >_Base[private]

Typedef _Iterator_category

typedef random_access_iterator_tag _Iterator_category

Typedef _Movable

typedef __move_traits< _Tp >::implemented_Movable[private]

Typedef _Self

typedef vector< _Tp, _Alloc >_Self[private]

Typedef _TrivialCopy

typedef __type_traits< _Tp >::has_trivial_assignment_operator_TrivialCopy[private]

Typedef _TrivialUCopy

typedef __type_traits< _Tp >::has_trivial_copy_constructor_TrivialUCopy[private]

Typedef allocator_type

typedef _Base::allocator_typeallocator_type

Typedef const_iterator

typedef const value_type *const_iterator

Typedef const_pointer

typedef const value_type *const_pointer

Typedef const_reference

typedef const value_type &const_reference

Typedef difference_type

typedef ptrdiff_t difference_type

Typedef iterator

typedef value_type *iterator

Typedef pointer

typedef value_type *pointer

Typedef reference

typedef value_type &reference

Typedef size_type

typedef size_t size_type

Typedef value_type

typedef _Tpvalue_type

Member Data Documentation

_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS

_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS