Home | History | Annotate | Download | only in bits

Lines Matching defs:vector

0 // Vector implementation -*- C++ -*-
53 * Do not attempt to use it directly. @headername{vector}
203 * In some terminology a %vector can be described as a dynamic
210 class vector : protected _Vector_base<_Tp, _Alloc>
227 typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
228 typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
248 vector()
252 * @brief Creates a %vector with no elements.
256 vector(const allocator_type& __a)
261 * @brief Creates a %vector with default constructed elements.
265 * This constructor fills the %vector with @a __n default
269 vector(size_type __n, const allocator_type& __a = allocator_type())
274 * @brief Creates a %vector with copies of an exemplar element.
279 * This constructor fills the %vector with @a __n copies of @a __value.
281 vector(size_type __n, const value_type& __value,
287 * @brief Creates a %vector with copies of an exemplar element.
292 * This constructor fills the %vector with @a __n copies of @a __value.
295 vector(size_type __n, const value_type& __value = value_type(),
302 * @brief %Vector copy constructor.
303 * @param __x A %vector of identical element and allocator types.
305 * The newly-created %vector uses a copy of the allocation
310 vector(const vector& __x)
321 * @brief %Vector move constructor.
322 * @param __x A %vector of identical element and allocator types.
324 * The newly-created %vector contains the exact contents of @a __x.
325 * The contents of @a __x are a valid, but unspecified %vector.
327 vector(vector&& __x) noexcept
331 vector(const vector& __x, const allocator_type& __a)
340 vector(vector&& __rv, const allocator_type& __m)
354 * @brief Builds a %vector from an initializer list.
358 * Create a %vector consisting of copies of the elements in the
364 vector(initializer_list<value_type> __l,
374 * @brief Builds a %vector from a range.
379 * Create a %vector consisting of copies of the elements from
392 vector(_InputIterator __first, _InputIterator __last,
398 vector(_InputIterator __first, _InputIterator __last,
414 ~vector() _GLIBCXX_NOEXCEPT
419 * @brief %Vector assignment operator.
420 * @param __x A %vector of identical element and allocator types.
426 vector&
427 operator=(const vector& __x);
431 * @brief %Vector move assignment operator.
432 * @param __x A %vector of identical element and allocator types.
434 * The contents of @a __x are moved into this %vector (without copying,
436 * @a __x is a valid, but unspecified %vector.
438 vector&
439 operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
450 * @brief %Vector list assignment operator.
453 * This function fills a %vector with copies of the elements in the
456 * Note that the assignment completely changes the %vector and
457 * that the resulting %vector's size is the same as the number
460 vector&
469 * @brief Assigns a given value to a %vector.
473 * This function fills a %vector with @a __n copies of the given
475 * %vector and that the resulting %vector's size is the same as
483 * @brief Assigns a range to a %vector.
487 * This function fills a %vector with copies of the elements in the
490 * Note that the assignment completely changes the %vector and
491 * that the resulting %vector's size is the same as the number
513 * @brief Assigns an initializer list to a %vector.
516 * This function fills a %vector with copies of the elements in the
519 * Note that the assignment completely changes the %vector and
520 * that the resulting %vector's size is the same as the number
534 * element in the %vector. Iteration is done in ordinary
543 * first element in the %vector. Iteration is done in ordinary
552 * element in the %vector. Iteration is done in ordinary
561 * the last element in the %vector. Iteration is done in
570 * last element in the %vector. Iteration is done in reverse
579 * to the last element in the %vector. Iteration is done in
588 * before the first element in the %vector. Iteration is done
597 * to one before the first element in the %vector. Iteration
607 * first element in the %vector. Iteration is done in ordinary
616 * the last element in the %vector. Iteration is done in
625 * to the last element in the %vector. Iteration is done in
634 * to one before the first element in the %vector. Iteration
643 /** Returns the number of elements in the %vector. */
648 /** Returns the size() of the largest possible %vector. */
655 * @brief Resizes the %vector to the specified number of elements.
656 * @param __new_size Number of elements the %vector should contain.
658 * This function will %resize the %vector to the specified
660 * %vector's current size the %vector is truncated, otherwise
673 * @brief Resizes the %vector to the specified number of elements.
674 * @param __new_size Number of elements the %vector should contain.
677 * This function will %resize the %vector to the specified
679 * %vector's current size the %vector is truncated, otherwise
680 * the %vector is extended and new elements are populated with
693 * @brief Resizes the %vector to the specified number of elements.
694 * @param __new_size Number of elements the %vector should contain.
697 * This function will %resize the %vector to the specified
699 * %vector's current size the %vector is truncated, otherwise
700 * the %vector is extended and new elements are populated with
721 * Returns the total number of elements that the %vector can
730 * Returns true if the %vector is empty. (Thus begin() would
744 * %vector to hold the specified number of elements. If the
752 * and copying of %vector data.
759 * @brief Subscript access to the data contained in the %vector.
774 * @brief Subscript access to the data contained in the %vector.
794 __throw_out_of_range(__N("vector::_M_range_check"));
799 * @brief Provides access to the data contained in the %vector.
806 * is first checked that it is in the range of the vector. The
817 * @brief Provides access to the data contained in the %vector.
824 * is first checked that it is in the range of the vector. The
836 * element of the %vector.
844 * element of the %vector.
852 * element of the %vector.
860 * last element of the %vector.
871 * range. For a non-empty %vector, data() == &front().
891 * @brief Add data to the end of the %vector.
895 * element at the end of the %vector and assigns the given data
896 * to it. Due to the nature of a %vector this operation can be
897 * done in constant time if the %vector has preallocated space
930 * This is a typical stack operation. It shrinks the %vector by one.
945 * @brief Inserts an object in %vector before specified iterator.
946 * @param __position An iterator into the %vector.
952 * Note that this kind of operation could be expensive for a %vector
962 * @brief Inserts given value into %vector before specified iterator.
963 * @param __position An iterator into the %vector.
969 * could be expensive for a %vector and if it is frequently
977 * @brief Inserts given rvalue into %vector before specified iterator.
978 * @param __position An iterator into the %vector.
984 * could be expensive for a %vector and if it is frequently
992 * @brief Inserts an initializer_list into the %vector.
993 * @param __position An iterator into the %vector.
997 * initializer_list @a l into the %vector before the location
1001 * %vector and if it is frequently used the user should
1010 * @brief Inserts a number of copies of given data into the %vector.
1011 * @param __position An iterator into the %vector.
1019 * %vector and if it is frequently used the user should
1027 * @brief Inserts a range into the %vector.
1028 * @param __position An iterator into the %vector.
1033 * [__first,__last) into the %vector before the location specified
1037 * %vector and if it is frequently used the user should
1065 * shorten the %vector by one.
1086 * [__first,__last) and shorten the %vector accordingly.
1099 * @brief Swaps data with another %vector.
1100 * @param __x A %vector of the same element and allocator types.
1108 swap(vector& __x)
1210 // vector(n,value,a) constructor.
1220 // Called by the vector(n) constructor.
1362 _M_move_assign(vector&& __x, std::true_type) noexcept
1364 vector __tmp(get_allocator());
1375 _M_move_assign(vector&& __x, std::false_type)
1393 * @brief Vector equality comparison.
1394 * @param __x A %vector.
1395 * @param __y A %vector of the same type as @a __x.
1404 operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1409 * @brief Vector ordering relation.
1410 * @param __x A %vector.
1411 * @param __y A %vector of the same type as @a __x.
1421 operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1428 operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1434 operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1440 operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1446 operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
1449 /// See std::vector::swap().
1452 swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)