• Home
  • Raw
  • Download

Lines Matching refs:__n

517     explicit vector(size_type __n);
519 explicit vector(size_type __n, const allocator_type& __a);
521 vector(size_type __n, const_reference __x);
522 vector(size_type __n, const_reference __x, const allocator_type& __a);
609 void assign(size_type __n, const_reference __u);
661 void reserve(size_type __n);
664 _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n);
665 _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const;
666 reference at(size_type __n);
667 const_reference at(size_type __n) const;
715 iterator insert(const_iterator __position, size_type __n, const_reference __x);
768 bool __addable(const const_iterator* __i, ptrdiff_t __n) const;
769 bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const;
775 void allocate(size_type __n);
778 void __construct_at_end(size_type __n);
779 void __construct_at_end(size_type __n, const_reference __x);
787 void __append(size_type __n);
788 void __append(size_type __n, const_reference __x);
856 void __annotate_increase(size_type __n) const
859 data() + size(), data() + size() + __n);
870 __RAII_IncreaseAnnotator(const vector &__v, size_type __n = 1)
871 : __commit(false), __v(__v), __n(__n) {
872 __v.__annotate_increase(__n);
877 __v.__annotate_shrink(__v.size() + __n);
880 size_type __n;
885 inline __RAII_IncreaseAnnotator(const vector &, size_type __n = 1) {}
923 // Allocate space for __n objects
924 // throws length_error if __n > max_size()
927 // Precondition: __n > 0
928 // Postcondition: capacity() == __n
932 vector<_Tp, _Allocator>::allocate(size_type __n)
934 if (__n > max_size())
936 this->__begin_ = this->__end_ = __alloc_traits::allocate(this->__alloc(), __n);
937 this->__end_cap() = this->__begin_ + __n;
975 // Default constructs __n objects starting at __end_
977 // Precondition: __n > 0
978 // Precondition: size() + __n <= capacity()
979 // Postcondition: size() == size() + __n
982 vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
990 --__n;
992 } while (__n > 0);
995 // Copy constructs __n objects starting at __end_ from __x
997 // Precondition: __n > 0
998 // Precondition: size() + __n <= capacity()
999 // Postcondition: size() == old size() + __n
1000 // Postcondition: [i] == __x for all i in [size() - __n, __n)
1004 vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
1012 --__n;
1014 } while (__n > 0);
1036 // Default constructs __n objects starting at __end_
1038 // Postcondition: size() == size() + __n
1042 vector<_Tp, _Allocator>::__append(size_type __n)
1044 if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
1045 this->__construct_at_end(__n);
1049 __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
1050 __v.__construct_at_end(__n);
1055 // Default constructs __n objects starting at __end_
1057 // Postcondition: size() == size() + __n
1061 vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
1063 if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
1064 this->__construct_at_end(__n, __x);
1068 __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
1069 __v.__construct_at_end(__n, __x);
1075 vector<_Tp, _Allocator>::vector(size_type __n)
1080 if (__n > 0)
1082 allocate(__n);
1083 __construct_at_end(__n);
1089 vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
1095 if (__n > 0)
1097 allocate(__n);
1098 __construct_at_end(__n);
1104 vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x)
1109 if (__n > 0)
1111 allocate(__n);
1112 __construct_at_end(__n, __x);
1117 vector<_Tp, _Allocator>::vector(size_type __n, const_reference __x, const allocator_type& __a)
1123 if (__n > 0)
1125 allocate(__n);
1126 __construct_at_end(__n, __x);
1176 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
1177 if (__n > 0)
1179 allocate(__n);
1196 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
1197 if (__n > 0)
1199 allocate(__n);
1211 size_type __n = __x.size();
1212 if (__n > 0)
1214 allocate(__n);
1226 size_type __n = __x.size();
1227 if (__n > 0)
1229 allocate(__n);
1424 vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
1426 if (__n <= capacity())
1429 _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u);
1430 if (__n > __s)
1431 __construct_at_end(__n - __s, __u);
1433 this->__destruct_at_end(this->__begin_ + __n);
1438 allocate(__recommend(static_cast<size_type>(__n)));
1439 __construct_at_end(__n, __u);
1502 vector<_Tp, _Allocator>::operator[](size_type __n)
1504 _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
1505 return this->__begin_[__n];
1511 vector<_Tp, _Allocator>::operator[](size_type __n) const
1513 _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
1514 return this->__begin_[__n];
1519 vector<_Tp, _Allocator>::at(size_type __n)
1521 if (__n >= size())
1523 return this->__begin_[__n];
1528 vector<_Tp, _Allocator>::at(size_type __n) const
1530 if (__n >= size())
1532 return this->__begin_[__n];
1537 vector<_Tp, _Allocator>::reserve(size_type __n)
1539 if (__n > capacity())
1542 __split_buffer<value_type, allocator_type&> __v(__n, size(), __a);
1710 difference_type __n = __old_last - __to;
1711 for (pointer __i = __from_s + __n; __i < __from_e; ++__i, ++this->__end_)
1715 _VSTD::move_backward(__from_s, __from_s + __n, __old_last);
1842 vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
1850 if (__n > 0)
1852 if (__n <= static_cast<size_type>(this->__end_cap() - this->__end_))
1854 size_type __old_n = __n;
1856 if (__n > static_cast<size_type>(this->__end_ - __p))
1858 size_type __cx = __n - (this->__end_ - __p);
1860 __n -= __cx;
1862 if (__n > 0)
1864 __RAII_IncreaseAnnotator __annotator(*this, __n);
1870 _VSTD::fill_n(__p, __n, *__xr);
1876 …__split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, _…
1877 __v.__construct_at_end(__n, __x);
1958 difference_type __n = _VSTD::distance(__first, __last);
1959 if (__n > 0)
1961 if (__n <= this->__end_cap() - this->__end_)
1963 size_type __old_n = __n;
1967 if (__n > __dx)
1972 __n = __dx;
1974 if (__n > 0)
1976 __RAII_IncreaseAnnotator __annotator(*this, __n);
1985 …__split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, _…
2073 vector<_Tp, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const
2075 const_pointer __p = __i->base() + __n;
2081 vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const
2083 const_pointer __p = __i->base() + __n;
2165 static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT
2166 {return __n * __bits_per_word;}
2168 static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT
2169 {return (__n - 1) / __bits_per_word + 1;}
2177 explicit vector(size_type __n);
2179 explicit vector(size_type __n, const allocator_type& __a);
2181 vector(size_type __n, const value_type& __v);
2182 vector(size_type __n, const value_type& __v, const allocator_type& __a);
2239 void assign(size_type __n, const value_type& __x);
2259 void reserve(size_type __n);
2301 …_LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) {return __make_ref(__n);}
2302 …_LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const {return __make_ref(__n);}
2303 reference at(size_type __n);
2304 const_reference at(size_type __n) const;
2327 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
2328 iterator insert(const_iterator __position, size_type __n, const_reference __x);
2367 void allocate(size_type __n);
2373 _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
2381 void __append(size_type __n, const_reference __x);
2473 // Allocate space for __n objects
2474 // throws length_error if __n > max_size()
2477 // Precondition: __n > 0
2478 // Postcondition: capacity() == __n
2482 vector<bool, _Allocator>::allocate(size_type __n)
2484 if (__n > max_size())
2486 __n = __external_cap_to_internal(__n);
2487 this->__begin_ = __storage_traits::allocate(this->__alloc(), __n);
2489 this->__cap() = __n;
2531 // Default constructs __n objects starting at __end_
2532 // Precondition: __n > 0
2533 // Precondition: size() + __n <= capacity()
2534 // Postcondition: size() == size() + __n
2538 vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
2541 this->__size_ += __n;
2542 _VSTD::fill_n(__make_iter(__old_size), __n, __x);
2579 vector<bool, _Allocator>::vector(size_type __n)
2584 if (__n > 0)
2586 allocate(__n);
2587 __construct_at_end(__n, false);
2593 vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
2598 if (__n > 0)
2600 allocate(__n);
2601 __construct_at_end(__n, false);
2607 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
2612 if (__n > 0)
2614 allocate(__n);
2615 __construct_at_end(__n, __x);
2620 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
2625 if (__n > 0)
2627 allocate(__n);
2628 __construct_at_end(__n, __x);
2694 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2695 if (__n > 0)
2697 allocate(__n);
2710 size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
2711 if (__n > 0)
2713 allocate(__n);
2726 size_type __n = static_cast<size_type>(__il.size());
2727 if (__n > 0)
2729 allocate(__n);
2740 size_type __n = static_cast<size_type>(__il.size());
2741 if (__n > 0)
2743 allocate(__n);
2882 vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
2885 if (__n > 0)
2888 if (__n <= __c)
2889 __size_ = __n;
2893 __v.reserve(__recommend(__n));
2894 __v.__size_ = __n;
2897 _VSTD::fill_n(begin(), __n, __x);
2926 difference_type __n = _VSTD::distance(__first, __last);
2927 if (__n)
2929 if (__n > capacity())
2932 allocate(__n);
2940 vector<bool, _Allocator>::reserve(size_type __n)
2942 if (__n > capacity())
2945 __v.allocate(__n);
2974 vector<bool, _Allocator>::at(size_type __n)
2976 if (__n >= size())
2978 return (*this)[__n];
2983 vector<bool, _Allocator>::at(size_type __n) const
2985 if (__n >= size())
2987 return (*this)[__n];
3027 vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x)
3031 if (__n <= __c && size() <= __c - __n)
3034 __size_ += __n;
3041 __v.reserve(__recommend(__size_ + __n));
3042 __v.__size_ = __size_ + __n;
3047 _VSTD::fill_n(__r, __n, __x);
3105 difference_type __n = _VSTD::distance(__first, __last);
3108 if (__n <= __c && size() <= __c - __n)
3111 __size_ += __n;
3118 __v.reserve(__recommend(__size_ + __n));
3119 __v.__size_ = __size_ + __n;
3171 size_type __n = __sz - __cs;
3172 if (__n <= __c && __cs <= __c - __n)
3175 __size_ += __n;
3180 __v.reserve(__recommend(__size_ + __n));
3181 __v.__size_ = __size_ + __n;
3185 _VSTD::fill_n(__r, __n, __x);
3196 size_type __n = __size_;
3198 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
3201 if (__n > 0)
3203 __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
3235 size_type __n = __size_;
3237 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
3240 if (__n > 0)
3242 const __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);