• Home
  • Raw
  • Download

Lines Matching refs:__n

514     explicit vector(size_type __n);
516 explicit vector(size_type __n, const allocator_type& __a);
518 vector(size_type __n, const value_type& __x);
519 vector(size_type __n, const value_type& __x, const allocator_type& __a);
612 void assign(size_type __n, const_reference __u);
665 void reserve(size_type __n);
668 _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n);
669 _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const;
670 reference at(size_type __n);
671 const_reference at(size_type __n) const;
737 iterator insert(const_iterator __position, size_type __n, const_reference __x);
795 bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
796 bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
803 void __vallocate(size_type __n);
806 void __construct_at_end(size_type __n);
808 void __construct_at_end(size_type __n, const_reference __x);
815 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n);
816 void __append(size_type __n);
817 void __append(size_type __n, const_reference __x);
878 void __annotate_increase(size_type __n) const
881 data() + size(), data() + size() + __n);
894 __RAII_IncreaseAnnotator(const vector &__v, size_type __n = 1)
895 : __commit(false), __v(__v), __old_size(__v.size() + __n) {
896 __v.__annotate_increase(__n);
964 // Allocate space for __n objects
965 // throws length_error if __n > max_size()
968 // Precondition: __n > 0
969 // Postcondition: capacity() == __n
973 vector<_Tp, _Allocator>::__vallocate(size_type __n)
975 if (__n > max_size())
977 this->__begin_ = this->__end_ = __alloc_traits::allocate(this->__alloc(), __n);
978 this->__end_cap() = this->__begin_ + __n;
1017 // Default constructs __n objects starting at __end_
1019 // Precondition: __n > 0
1020 // Precondition: size() + __n <= capacity()
1021 // Postcondition: size() == size() + __n
1024 vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
1032 --__n;
1034 } while (__n > 0);
1037 // Copy constructs __n objects starting at __end_ from __x
1039 // Precondition: __n > 0
1040 // Precondition: size() + __n <= capacity()
1041 // Postcondition: size() == old size() + __n
1042 // Postcondition: [i] == __x for all i in [size() - __n, __n)
1046 vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
1054 --__n;
1056 } while (__n > 0);
1066 …, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n)
1069 __RAII_IncreaseAnnotator __annotator(*this, __n);
1074 // Default constructs __n objects starting at __end_
1076 // Postcondition: size() == size() + __n
1080 vector<_Tp, _Allocator>::__append(size_type __n)
1082 if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
1083 this->__construct_at_end(__n);
1087 __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
1088 __v.__construct_at_end(__n);
1093 // Default constructs __n objects starting at __end_
1095 // Postcondition: size() == size() + __n
1099 vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
1101 if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
1102 this->__construct_at_end(__n, __x);
1106 __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
1107 __v.__construct_at_end(__n, __x);
1113 vector<_Tp, _Allocator>::vector(size_type __n)
1118 if (__n > 0)
1120 __vallocate(__n);
1121 __construct_at_end(__n);
1127 vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
1133 if (__n > 0)
1135 __vallocate(__n);
1136 __construct_at_end(__n);
1142 vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
1147 if (__n > 0)
1149 __vallocate(__n);
1150 __construct_at_end(__n, __x);
1155 vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
1161 if (__n > 0)
1163 __vallocate(__n);
1164 __construct_at_end(__n, __x);
1214 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
1215 if (__n > 0)
1217 __vallocate(__n);
1218 __construct_at_end(__first, __last, __n);
1234 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
1235 if (__n > 0)
1237 __vallocate(__n);
1238 __construct_at_end(__first, __last, __n);
1249 size_type __n = __x.size();
1250 if (__n > 0)
1252 __vallocate(__n);
1253 __construct_at_end(__x.__begin_, __x.__end_, __n);
1264 size_type __n = __x.size();
1265 if (__n > 0)
1267 __vallocate(__n);
1268 __construct_at_end(__x.__begin_, __x.__end_, __n);
1462 vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
1464 if (__n <= capacity())
1467 _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u);
1468 if (__n > __s)
1469 __construct_at_end(__n - __s, __u);
1471 this->__destruct_at_end(this->__begin_ + __n);
1476 __vallocate(__recommend(static_cast<size_type>(__n)));
1477 __construct_at_end(__n, __u);
1541 vector<_Tp, _Allocator>::operator[](size_type __n)
1543 _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
1544 return this->__begin_[__n];
1550 vector<_Tp, _Allocator>::operator[](size_type __n) const
1552 _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
1553 return this->__begin_[__n];
1558 vector<_Tp, _Allocator>::at(size_type __n)
1560 if (__n >= size())
1562 return this->__begin_[__n];
1567 vector<_Tp, _Allocator>::at(size_type __n) const
1569 if (__n >= size())
1571 return this->__begin_[__n];
1576 vector<_Tp, _Allocator>::reserve(size_type __n)
1578 if (__n > capacity())
1581 __split_buffer<value_type, allocator_type&> __v(__n, size(), __a);
1759 difference_type __n = __old_last - __to;
1760 for (pointer __i = __from_s + __n; __i < __from_e; ++__i, ++this->__end_)
1764 _VSTD::move_backward(__from_s, __from_s + __n, __old_last);
1888 vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
1896 if (__n > 0)
1898 if (__n <= static_cast<size_type>(this->__end_cap() - this->__end_))
1900 size_type __old_n = __n;
1902 if (__n > static_cast<size_type>(this->__end_ - __p))
1904 size_type __cx = __n - (this->__end_ - __p);
1906 __n -= __cx;
1908 if (__n > 0)
1910 __RAII_IncreaseAnnotator __annotator(*this, __n);
1916 _VSTD::fill_n(__p, __n, *__xr);
1922 …__split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, _…
1923 __v.__construct_at_end(__n, __x);
2006 difference_type __n = _VSTD::distance(__first, __last);
2007 if (__n > 0)
2009 if (__n <= this->__end_cap() - this->__end_)
2011 size_type __old_n = __n;
2015 if (__n > __dx)
2020 __construct_at_end(__m, __last, __n - __diff);
2021 __n = __dx;
2023 if (__n > 0)
2025 __RAII_IncreaseAnnotator __annotator(*this, __n);
2034 …__split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, _…
2127 vector<_Tp, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
2129 const_pointer __p = __i->base() + __n;
2135 vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const
2137 const_pointer __p = __i->base() + __n;
2235 static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT
2236 {return __n * __bits_per_word;}
2238 static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT
2239 {return (__n - 1) / __bits_per_word + 1;}
2252 explicit vector(size_type __n);
2254 explicit vector(size_type __n, const allocator_type& __a);
2256 vector(size_type __n, const value_type& __v);
2257 vector(size_type __n, const value_type& __v, const allocator_type& __a);
2315 void assign(size_type __n, const value_type& __x);
2336 void reserve(size_type __n);
2378 …_LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) {return __make_ref(__n);}
2379 …_LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const {return __make_ref(__n);}
2380 reference at(size_type __n);
2381 const_reference at(size_type __n) const;
2413 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
2414 iterator insert(const_iterator __position, size_type __n, const_reference __x);
2459 void __vallocate(size_type __n);
2465 _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
2473 void __append(size_type __n, const_reference __x);
2545 // Allocate space for __n objects
2546 // throws length_error if __n > max_size()
2549 // Precondition: __n > 0
2550 // Postcondition: capacity() == __n
2554 vector<bool, _Allocator>::__vallocate(size_type __n)
2556 if (__n > max_size())
2558 __n = __external_cap_to_internal(__n);
2559 this->__begin_ = __storage_traits::allocate(this->__alloc(), __n);
2561 this->__cap() = __n;
2603 // Default constructs __n objects starting at __end_
2604 // Precondition: __n > 0
2605 // Precondition: size() + __n <= capacity()
2606 // Postcondition: size() == size() + __n
2610 vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
2613 this->__size_ += __n;
2621 _VSTD::fill_n(__make_iter(__old_size), __n, __x);
2670 vector<bool, _Allocator>::vector(size_type __n)
2675 if (__n > 0)
2677 __vallocate(__n);
2678 __construct_at_end(__n, false);
2684 vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
2689 if (__n > 0)
2691 __vallocate(__n);
2692 __construct_at_end(__n, false);
2698 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
2703 if (__n > 0)
2705 __vallocate(__n);
2706 __construct_at_end(__n, __x);
2711 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
2716 if (__n > 0)
2718 __vallocate(__n);
2719 __construct_at_end(__n, __x);
2785 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2786 if (__n > 0)
2788 __vallocate(__n);
2801 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2802 if (__n > 0)
2804 __vallocate(__n);
2817 size_type __n = static_cast<size_type>(__il.size());
2818 if (__n > 0)
2820 __vallocate(__n);
2831 size_type __n = static_cast<size_type>(__il.size());
2832 if (__n > 0)
2834 __vallocate(__n);
2973 vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
2976 if (__n > 0)
2979 if (__n <= __c)
2980 __size_ = __n;
2984 __v.reserve(__recommend(__n));
2985 __v.__size_ = __n;
2988 _VSTD::fill_n(begin(), __n, __x);
3020 const size_t __n = static_cast<size_type>(__ns);
3021 if (__n)
3023 if (__n > capacity())
3026 __vallocate(__n);
3034 vector<bool, _Allocator>::reserve(size_type __n)
3036 if (__n > capacity())
3039 __v.__vallocate(__n);
3068 vector<bool, _Allocator>::at(size_type __n)
3070 if (__n >= size())
3072 return (*this)[__n];
3077 vector<bool, _Allocator>::at(size_type __n) const
3079 if (__n >= size())
3081 return (*this)[__n];
3121 vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x)
3125 if (__n <= __c && size() <= __c - __n)
3128 __size_ += __n;
3135 __v.reserve(__recommend(__size_ + __n));
3136 __v.__size_ = __size_ + __n;
3141 _VSTD::fill_n(__r, __n, __x);
3201 const size_type __n = static_cast<size_type>(__n_signed);
3204 if (__n <= __c && size() <= __c - __n)
3207 __size_ += __n;
3214 __v.reserve(__recommend(__size_ + __n));
3215 __v.__size_ = __size_ + __n;
3272 size_type __n = __sz - __cs;
3273 if (__n <= __c && __cs <= __c - __n)
3276 __size_ += __n;
3281 __v.reserve(__recommend(__size_ + __n));
3282 __v.__size_ = __size_ + __n;
3286 _VSTD::fill_n(__r, __n, __x);
3297 size_type __n = __size_;
3299 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
3302 if (__n > 0)
3304 __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
3336 size_type __n = __size_;
3338 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
3341 if (__n > 0)
3343 const __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);