Definition at line 49 of file debug/vector.
std::__debug::vector< _Tp, _Allocator >::vector | ( | const _Allocator & | __a = _Allocator() |
) | [inline, explicit] |
Default constructor creates no elements.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 79 of file debug/vector.
std::__debug::vector< _Tp, _Allocator >::vector | ( | _InputIterator | __first, | |
_InputIterator | __last, | |||
const _Allocator & | __a = _Allocator() | |||
) | [inline] |
Builds a vector from a range.
first | An input iterator. | |
last | An input iterator. |
If the iterators are forward, bidirectional, or random-access, then this will call the elements' copy constructor N times (where N is distance(first,last)) and do no memory reallocation. But if only input iterators are used, then this will do at most 2N calls to the copy constructor, and logN memory reallocations.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 87 of file debug/vector.
std::__debug::vector< _Tp, _Allocator >::vector | ( | const _Base & | __x | ) | [inline] |
std::__debug::vector< _Tp, _Allocator >::~vector | ( | ) | [inline] |
The dtor only erases the elements, and note that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 101 of file debug/vector.
void __gnu_debug::_Safe_sequence_base::_M_detach_all | ( | ) | [protected, inherited] |
Detach all iterators, leaving them singular.
Referenced by __gnu_debug::_Safe_sequence_base::~_Safe_sequence_base().
void __gnu_debug::_Safe_sequence_base::_M_detach_singular | ( | ) | [protected, inherited] |
Detach all singular iterators.
Referenced by std::__debug::deque< _Tp, _Allocator >::erase(), and std::__debug::list< _Tp, _Allocator >::resize().
__gnu_cxx::__mutex& __gnu_debug::_Safe_sequence_base::_M_get_mutex | ( | ) | [protected, inherited] |
For use in _Safe_sequence.
void __gnu_debug::_Safe_sequence_base::_M_invalidate_all | ( | ) | const [inline, inherited] |
Invalidates all iterators.
Definition at line 220 of file safe_base.h.
References __gnu_debug::_Safe_sequence_base::_M_version.
Referenced by __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::append(), std::__debug::vector< _Tp, _Allocator >::assign(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::assign(), std::__debug::deque< _Tp, _Allocator >::assign(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::c_str(), std::__debug::vector< _Tp, _Allocator >::clear(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::clear(), std::__debug::deque< _Tp, _Allocator >::clear(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::data(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::erase(), std::__debug::deque< _Tp, _Allocator >::erase(), __gnu_debug::getline(), std::__debug::vector< _Tp, _Allocator >::insert(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::insert(), std::__debug::deque< _Tp, _Allocator >::insert(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator+=(), std::__debug::vector< _Tp, _Allocator >::operator=(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::operator=(), std::__debug::deque< _Tp, _Allocator >::operator=(), __gnu_debug::operator>>(), std::__debug::vector< _Tp, _Allocator >::push_back(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::push_back(), std::__debug::deque< _Tp, _Allocator >::push_back(), std::__debug::deque< _Tp, _Allocator >::push_front(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::replace(), std::__debug::vector< _Tp, _Allocator >::reserve(), std::__debug::vector< _Tp, _Allocator >::resize(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::resize(), std::__debug::deque< _Tp, _Allocator >::resize(), and __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::swap().
void __gnu_debug::_Safe_sequence< _Sequence >::_M_invalidate_if | ( | _Predicate | __pred | ) | [inherited] |
Invalidates all iterators x
that reference this sequence, are not singular, and for which pred(x)
returns true
. The user of this routine should be careful not to make copies of the iterators passed to pred
, as the copies may interfere with the invalidation.
Definition at line 126 of file safe_sequence.h.
References __gnu_debug::_Safe_sequence_base::_M_const_iterators, and __gnu_debug::_Safe_sequence_base::_M_iterators.
Referenced by std::__debug::vector< _Tp, _Allocator >::erase(), std::__debug::vector< _Tp, _Allocator >::insert(), std::__debug::vector< _Tp, _Allocator >::resize(), and std::__debug::deque< _Tp, _Allocator >::resize().
void __gnu_debug::_Safe_sequence_base::_M_revalidate_singular | ( | ) | [protected, inherited] |
Revalidates all attached singular iterators. This method may be used to validate iterators that were invalidated before (but for some reasion, such as an exception, need to become valid again).
Referenced by std::__debug::deque< _Tp, _Allocator >::erase(), and std::__debug::list< _Tp, _Allocator >::resize().
void __gnu_debug::_Safe_sequence_base::_M_swap | ( | _Safe_sequence_base & | __x | ) | [protected, inherited] |
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container.
Referenced by std::__debug::vector< _Tp, _Allocator >::swap(), __gnu_debug::basic_string< _CharT, _Traits, _Allocator >::swap(), std::__debug::set< _Key, _Compare, _Allocator >::swap(), std::__debug::multiset< _Key, _Compare, _Allocator >::swap(), std::__debug::multimap< _Key, _Tp, _Compare, _Allocator >::swap(), std::__debug::map< _Key, _Tp, _Compare, _Allocator >::swap(), std::__debug::list< _Tp, _Allocator >::swap(), __gnu_cxx::__debug::hash_set< _Value, _HashFcn, _EqualKey, _Alloc >::swap(), __gnu_cxx::__debug::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc >::swap(), __gnu_cxx::__debug::hash_multimap< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::swap(), __gnu_cxx::__debug::hash_map< _Value, _Tp, _HashFcn, _EqualKey, _Alloc >::swap(), and std::__debug::deque< _Tp, _Allocator >::swap().
void __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_iter | ( | const _Safe_iterator< _Iterator, _Sequence > & | __x | ) | [inherited] |
Transfers all iterators that reference this memory location to this sequence from whatever sequence they are attached to.
Definition at line 159 of file safe_sequence.h.
References __gnu_debug::_Safe_sequence_base::_M_const_iterators, __gnu_debug::_Safe_sequence_base::_M_iterators, __gnu_debug::_Safe_iterator_base::_M_sequence, and __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::base().
Referenced by std::__debug::list< _Tp, _Allocator >::splice().
void std::vector< _Tp , _Allocator >::assign | ( | size_type | __n, | |
const value_type & | __val | |||
) | [inline, inherited] |
Assigns a given value to a vector.
n | Number of elements to be assigned. | |
val | Value to be assigned. |
Definition at line 293 of file stl_vector.h.
Referenced by std::__debug::vector< _Tp, _Allocator >::assign().
void std::__debug::vector< _Tp, _Allocator >::assign | ( | _InputIterator | __first, | |
_InputIterator | __last | |||
) | [inline] |
Assigns a range to a vector.
first | An input iterator. | |
last | An input iterator. |
Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 114 of file debug/vector.
References __glibcxx_check_valid_range, __gnu_debug::_Safe_sequence_base::_M_invalidate_all(), and std::vector< _Tp, _Allocator >::assign().
const_reference std::vector< _Tp , _Allocator >::at | ( | size_type | __n | ) | const [inline, inherited] |
Provides access to the data contained in the vector.
n | The index of the element for which data should be accessed. |
std::out_of_range | If n is an invalid index. |
Definition at line 532 of file stl_vector.h.
reference std::vector< _Tp , _Allocator >::at | ( | size_type | __n | ) | [inline, inherited] |
Provides access to the data contained in the vector.
n | The index of the element for which data should be accessed. |
std::out_of_range | If n is an invalid index. |
Definition at line 514 of file stl_vector.h.
const_reference std::__debug::vector< _Tp, _Allocator >::back | ( | ) | const [inline] |
Returns a read-only (constant) reference to the data at the last element of the vector.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 233 of file debug/vector.
References __glibcxx_check_nonempty, and std::vector< _Tp, _Allocator >::back().
reference std::__debug::vector< _Tp, _Allocator >::back | ( | ) | [inline] |
Returns a read/write reference to the data at the last element of the vector.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 226 of file debug/vector.
References __glibcxx_check_nonempty, and std::vector< _Tp, _Allocator >::back().
const_iterator std::__debug::vector< _Tp, _Allocator >::begin | ( | ) | const [inline] |
Returns a read-only (constant) iterator that points to the first element in the vector. Iteration is done in ordinary element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 138 of file debug/vector.
References std::vector< _Tp, _Allocator >::begin().
iterator std::__debug::vector< _Tp, _Allocator >::begin | ( | ) | [inline] |
Returns a read/write iterator that points to the first element in the vector. Iteration is done in ordinary element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 134 of file debug/vector.
References std::vector< _Tp, _Allocator >::begin().
Referenced by std::__debug::vector< _Tp, _Allocator >::erase(), std::__debug::vector< _Tp, _Allocator >::insert(), std::__debug::vector< _Tp, _Allocator >::rend(), and std::__debug::vector< _Tp, _Allocator >::resize().
size_type std::vector< _Tp , _Allocator >::capacity | ( | ) | const [inline, inherited] |
Returns the total number of elements that the vector can hold before needing to allocate more memory.
Definition at line 429 of file stl_vector.h.
void std::__debug::vector< _Tp, _Allocator >::clear | ( | ) | [inline] |
Erases all the elements. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 346 of file debug/vector.
References __gnu_debug::_Safe_sequence_base::_M_invalidate_all(), and std::vector< _Tp, _Allocator >::clear().
pointer std::vector< _Tp , _Allocator >::data | ( | ) | [inline, inherited] |
bool std::vector< _Tp , _Allocator >::empty | ( | ) | const [inline, inherited] |
Returns true if the vector is empty. (Thus begin() would equal end().)
Definition at line 438 of file stl_vector.h.
const_iterator std::__debug::vector< _Tp, _Allocator >::end | ( | ) | const [inline] |
Returns a read-only (constant) iterator that points one past the last element in the vector. Iteration is done in ordinary element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 146 of file debug/vector.
References std::vector< _Tp, _Allocator >::end().
iterator std::__debug::vector< _Tp, _Allocator >::end | ( | ) | [inline] |
Returns a read/write iterator that points one past the last element in the vector. Iteration is done in ordinary element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 142 of file debug/vector.
References std::vector< _Tp, _Allocator >::end().
Referenced by std::__debug::vector< _Tp, _Allocator >::pop_back(), and std::__debug::vector< _Tp, _Allocator >::rbegin().
iterator std::vector< _Tp , _Allocator >::erase | ( | iterator | __first, | |
iterator | __last | |||
) | [inherited] |
Remove a range of elements.
first | Iterator pointing to the first element to be erased. | |
last | Iterator pointing to one past the last element to be erased. |
Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.
iterator std::vector< _Tp , _Allocator >::erase | ( | iterator | __position | ) | [inherited] |
Remove element at given position.
position | Iterator pointing to element to be erased. |
Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty.
Referenced by std::__debug::vector< _Tp, _Allocator >::erase().
const_reference std::__debug::vector< _Tp, _Allocator >::front | ( | ) | const [inline] |
Returns a read-only (constant) reference to the data at the first element of the vector.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 219 of file debug/vector.
References __glibcxx_check_nonempty, and std::vector< _Tp, _Allocator >::front().
reference std::__debug::vector< _Tp, _Allocator >::front | ( | ) | [inline] |
Returns a read/write reference to the data at the first element of the vector.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 212 of file debug/vector.
References __glibcxx_check_nonempty, and std::vector< _Tp, _Allocator >::front().
void std::vector< _Tp , _Allocator >::insert | ( | iterator | __position, | |
_InputIterator | __first, | |||
_InputIterator | __last | |||
) | [inline, inherited] |
Inserts a range into the vector.
position | An iterator into the vector. | |
first | An input iterator. | |
last | An input iterator. |
Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 671 of file stl_vector.h.
void std::vector< _Tp , _Allocator >::insert | ( | iterator | __position, | |
size_type | __n, | |||
const value_type & | __x | |||
) | [inline, inherited] |
Inserts a number of copies of given data into the vector.
position | An iterator into the vector. | |
n | Number of elements to be inserted. | |
x | Data to be inserted. |
Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 652 of file stl_vector.h.
iterator std::vector< _Tp , _Allocator >::insert | ( | iterator | __position, | |
const value_type & | __x | |||
) | [inherited] |
Inserts given value into vector before specified iterator.
position | An iterator into the vector. | |
x | Data to be inserted. |
Referenced by std::__debug::vector< _Tp, _Allocator >::insert().
size_type std::vector< _Tp , _Allocator >::max_size | ( | ) | const [inline, inherited] |
Returns the size() of the largest possible vector.
Definition at line 401 of file stl_vector.h.
const_reference std::vector< _Tp , _Allocator >::operator[] | ( | size_type | __n | ) | const [inline, inherited] |
Subscript access to the data contained in the vector.
n | The index of the element for which data should be accessed. |
Definition at line 489 of file stl_vector.h.
reference std::vector< _Tp , _Allocator >::operator[] | ( | size_type | __n | ) | [inline, inherited] |
Subscript access to the data contained in the vector.
n | The index of the element for which data should be accessed. |
Definition at line 474 of file stl_vector.h.
void std::__debug::vector< _Tp, _Allocator >::pop_back | ( | ) | [inline] |
Removes last element.
This is a typical stack operation. It shrinks the vector by one.
Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 255 of file debug/vector.
References __glibcxx_check_nonempty, __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::_M_invalidate(), std::__debug::vector< _Tp, _Allocator >::end(), and std::vector< _Tp, _Allocator >::pop_back().
void std::__debug::vector< _Tp, _Allocator >::push_back | ( | const _Tp & | __x | ) | [inline] |
Add data to the end of the vector.
x | Data to be added. |
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 245 of file debug/vector.
References __gnu_debug::_Safe_sequence_base::_M_invalidate_all(), and std::vector< _Tp, _Allocator >::push_back().
const_reverse_iterator std::__debug::vector< _Tp, _Allocator >::rbegin | ( | ) | const [inline] |
Returns a read-only (constant) reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 154 of file debug/vector.
References std::__debug::vector< _Tp, _Allocator >::end().
reverse_iterator std::__debug::vector< _Tp, _Allocator >::rbegin | ( | ) | [inline] |
Returns a read/write reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 150 of file debug/vector.
References std::__debug::vector< _Tp, _Allocator >::end().
const_reverse_iterator std::__debug::vector< _Tp, _Allocator >::rend | ( | ) | const [inline] |
Returns a read-only (constant) reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 162 of file debug/vector.
References std::__debug::vector< _Tp, _Allocator >::begin().
reverse_iterator std::__debug::vector< _Tp, _Allocator >::rend | ( | ) | [inline] |
Returns a read/write reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.
Reimplemented from std::vector< _Tp, _Allocator >.
Definition at line 158 of file debug/vector.
References std::__debug::vector< _Tp, _Allocator >::begin().
void std::vector< _Tp , _Allocator >::reserve | ( | size_type | __n | ) | [inherited] |
Attempt to preallocate enough memory for specified number of elements.
n | Number of elements required. |
std::length_error | If n exceeds max_size() . |
The advantage of this function is that if optimal code is a necessity and the user can determine the number of elements that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of vector data.
Referenced by std::__debug::vector< _Tp, _Allocator >::reserve().
void std::vector< _Tp , _Allocator >::resize | ( | size_type | __new_size, | |
value_type | __x = value_type() | |||
) | [inline, inherited] |
Resizes the vector to the specified number of elements.
new_size | Number of elements the vector should contain. | |
x | Data with which new elements should be populated. |
Definition at line 416 of file stl_vector.h.
Referenced by std::__debug::vector< _Tp, _Allocator >::resize().
size_type std::vector< _Tp , _Allocator >::size | ( | ) | const [inline, inherited] |
Returns the number of elements in the vector.
Definition at line 396 of file stl_vector.h.
Referenced by std::__debug::vector< _Tp, _Allocator >::resize().
void std::vector< _Tp , _Allocator >::swap | ( | vector< _Tp, _Allocator > & | __x | ) | [inline, inherited] |
Swaps data with another vector.
x | A vector of the same element and allocator types. |
Definition at line 728 of file stl_vector.h.
References std::_Vector_base< _Tp, _Alloc >::_M_get_Tp_allocator(), std::_Vector_base< _Tp, _Alloc >::_M_impl, std::__alloc_swap< _Alloc, >::_S_do_it(), and std::swap().
_Safe_iterator_base* __gnu_debug::_Safe_sequence_base::_M_const_iterators [inherited] |
The list of constant iterators that reference this container.
Definition at line 171 of file safe_base.h.
Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_invalidate_if(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::_M_invalidate_single(), and __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_iter().
_Safe_iterator_base* __gnu_debug::_Safe_sequence_base::_M_iterators [inherited] |
The list of mutable iterators that reference this container.
Definition at line 168 of file safe_base.h.
Referenced by __gnu_debug::_Safe_sequence< _Sequence >::_M_invalidate_if(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence >::_M_invalidate_single(), and __gnu_debug::_Safe_sequence< _Sequence >::_M_transfer_iter().
unsigned int __gnu_debug::_Safe_sequence_base::_M_version [mutable, inherited] |
The container version number. This number may never be 0.
Definition at line 174 of file safe_base.h.
Referenced by __gnu_debug::_Safe_sequence_base::_M_invalidate_all().