• Home
  • Raw
  • Download

Lines Matching refs:__n

358     _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator+=(difference_type __n)
360 if (__n != 0)
362 __n += __ptr_ - *__m_iter_;
363 if (__n > 0)
365 __m_iter_ += __n / __block_size;
366 __ptr_ = *__m_iter_ + __n % __block_size;
368 else // (__n < 0)
370 difference_type __z = __block_size - 1 - __n;
378 _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(difference_type __n)
380 return *this += -__n;
383 _LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(difference_type __n) const
386 __t += __n;
390 _LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(difference_type __n) const
393 __t -= __n;
398 friend __deque_iterator operator+(difference_type __n, const __deque_iterator& __it)
399 {return __it + __n;}
411 _LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const
412 {return *(*this + __n);}
573 difference_type __n = __l - __f;
575 if (__n > __bs)
577 __n = __bs;
578 __m = __f + __n;
582 __r += __n;
597 difference_type __n = __l - __f;
598 while (__n > 0)
603 if (__bs > __n)
605 __bs = __n;
609 __n -= __bs;
625 difference_type __n = __l - __f;
626 while (__n > 0)
631 if (__bs > __n)
633 __bs = __n;
637 __n -= __bs;
661 difference_type __n = __l - __f;
663 if (__n > __bs)
665 __n = __bs;
666 __m = __l - __n;
670 __r -= __n;
684 difference_type __n = __l - __f;
685 while (__n > 0)
691 if (__bs > __n)
693 __bs = __n;
697 __n -= __bs;
712 difference_type __n = __l - __f;
713 while (__n > 0)
719 if (__bs > __n)
721 __bs = __n;
725 __n -= __bs;
749 difference_type __n = __l - __f;
751 if (__n > __bs)
753 __n = __bs;
754 __m = __f + __n;
758 __r += __n;
773 difference_type __n = __l - __f;
774 while (__n > 0)
779 if (__bs > __n)
781 __bs = __n;
785 __n -= __bs;
801 difference_type __n = __l - __f;
802 while (__n > 0)
807 if (__bs > __n)
809 __bs = __n;
813 __n -= __bs;
837 difference_type __n = __l - __f;
839 if (__n > __bs)
841 __n = __bs;
842 __m = __l - __n;
846 __r -= __n;
860 difference_type __n = __l - __f;
861 while (__n > 0)
867 if (__bs > __n)
869 __bs = __n;
873 __n -= __bs;
888 difference_type __n = __l - __f;
889 while (__n > 0)
895 if (__bs > __n)
897 __bs = __n;
901 __n -= __bs;
1305 explicit deque(size_type __n);
1307 explicit deque(size_type __n, const _Allocator& __a);
1309 deque(size_type __n, const value_type& __v);
1310 deque(size_type __n, const value_type& __v, const allocator_type& __a);
1349 void assign(size_type __n, const value_type& __v);
1399 void resize(size_type __n);
1400 void resize(size_type __n, const value_type& __v);
1445 iterator insert(const_iterator __p, size_type __n, const value_type& __v);
1480 static size_type __recommend_blocks(size_type __n)
1482 return __n / __base::__block_size + (__n % __base::__block_size != 0);
1545 void __append(size_type __n);
1546 void __append(size_type __n, const value_type& __v);
1549 void __add_front_capacity(size_type __n);
1551 void __add_back_capacity(size_type __n);
1605 deque<_Tp, _Allocator>::deque(size_type __n)
1607 if (__n > 0)
1608 __append(__n);
1613 deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
1616 if (__n > 0)
1617 __append(__n);
1622 deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v)
1624 if (__n > 0)
1625 __append(__n, __v);
1629 deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v, const allocator_type& __a)
1632 if (__n > 0)
1633 __append(__n, __v);
1786 deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v)
1788 if (__n > __base::size())
1791 __n -= __base::size();
1792 __append(__n, __v);
1795 __erase_to_end(_VSTD::fill_n(__base::begin(), __n, __v));
1808 deque<_Tp, _Allocator>::resize(size_type __n)
1810 if (__n > __base::size())
1811 __append(__n - __base::size());
1812 else if (__n < __base::size())
1813 __erase_to_end(__base::begin() + __n);
1818 deque<_Tp, _Allocator>::resize(size_type __n, const value_type& __v)
1820 if (__n > __base::size())
1821 __append(__n - __base::size(), __v);
1822 else if (__n < __base::size())
1823 __erase_to_end(__base::begin() + __n);
2197 deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_type& __v)
2204 if (__n > __front_spare())
2205 __add_front_capacity(__n - __front_spare());
2206 // __n <= __front_spare()
2209 if (__n > __pos)
2211 for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
2213 __n = __pos;
2215 if (__n > 0)
2218 iterator __obn = __old_begin + __n;
2220 if (__n < __pos)
2222 _VSTD::fill_n(__old_begin, __n, *__vt);
2228 if (__n > __back_capacity)
2229 __add_back_capacity(__n - __back_capacity);
2230 // __n <= __back_capacity
2234 if (__n > __de)
2236 for (size_type __m = __n - __de; __m; --__m, ++__i, ++__base::size())
2238 __n = __de;
2240 if (__n > 0)
2243 iterator __oen = __old_end - __n;
2245 if (__n < __de)
2247 _VSTD::fill_n(__old_end - __n, __n, *__vt);
2273 size_type __n = _VSTD::distance(__f, __l);
2274 __split_buffer<value_type, allocator_type&> __buf(__n, 0, __base::__alloc());
2286 size_type __n = _VSTD::distance(__f, __l);
2292 if (__n > __front_spare())
2293 __add_front_capacity(__n - __front_spare());
2294 // __n <= __front_spare()
2298 if (__n > __pos)
2300 __m = __pos < __n / 2 ? _VSTD::prev(__l, __pos) : _VSTD::next(__f, __n - __pos);
2303 __n = __pos;
2305 if (__n > 0)
2307 iterator __obn = __old_begin + __n;
2314 if (__n < __pos)
2322 if (__n > __back_capacity)
2323 __add_back_capacity(__n - __back_capacity);
2324 // __n <= __back_capacity
2329 if (__n > __de)
2331 __m = __de < __n / 2 ? _VSTD::next(__f, __de) : _VSTD::prev(__l, __n - __de);
2334 __n = __de;
2336 if (__n > 0)
2338 iterator __oen = __old_end - __n;
2341 if (__n < __de)
2370 size_type __n = _VSTD::distance(__f, __l);
2373 if (__n > __back_capacity)
2374 __add_back_capacity(__n - __back_capacity);
2375 // __n <= __back_capacity
2376 for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
2386 deque<_Tp, _Allocator>::__append(size_type __n)
2390 if (__n > __back_capacity)
2391 __add_back_capacity(__n - __back_capacity);
2392 // __n <= __back_capacity
2393 for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
2403 deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
2407 if (__n > __back_capacity)
2408 __add_back_capacity(__n - __back_capacity);
2409 // __n <= __back_capacity
2410 for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
2479 // Create front capacity for __n elements.
2483 deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
2486 size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
2619 // Create back capacity for __n elements.
2623 deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
2626 size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
2743 difference_type __n = __l - __f;
2744 while (__n > 0)
2749 if (__bs > __n)
2751 __bs = __n;
2757 __n -= __bs;
2773 difference_type __n = __l - __f;
2774 while (__n > 0)
2780 if (__bs > __n)
2782 __bs = __n;
2788 __n -= __bs;
2805 difference_type __n = __l - __f;
2806 while (__n > 0)
2811 if (__bs > __n)
2813 __bs = __n;
2820 __n -= __bs;
2840 difference_type __n = __l - __f;
2841 while (__n > 0)
2847 if (__bs > __n)
2849 __bs = __n;
2860 __n -= __bs;
2895 difference_type __n = __l - __f;
2899 if (__n > 0)
2902 if (static_cast<size_t>(__pos) <= (__base::size() - __n) / 2)
2904 iterator __i = _VSTD::move_backward(__b, __p, __p + __n);
2907 __base::size() -= __n;
2908 __base::__start_ += __n;
2914 iterator __i = _VSTD::move(__p + __n, __base::end(), __p);
2917 __base::size() -= __n;
2930 difference_type __n = __e - __f;
2931 if (__n > 0)
2938 __base::size() -= __n;