• Home
  • Raw
  • Download

Lines Matching refs:__n

333     _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator+=(difference_type __n)
335 if (__n != 0)
337 __n += __ptr_ - *__m_iter_;
338 if (__n > 0)
340 __m_iter_ += __n / __block_size;
341 __ptr_ = *__m_iter_ + __n % __block_size;
343 else // (__n < 0)
345 difference_type __z = __block_size - 1 - __n;
353 _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(difference_type __n)
355 return *this += -__n;
358 _LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(difference_type __n) const
361 __t += __n;
365 _LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(difference_type __n) const
368 __t -= __n;
373 friend __deque_iterator operator+(difference_type __n, const __deque_iterator& __it)
374 {return __it + __n;}
386 _LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const
387 {return *(*this + __n);}
541 difference_type __n = __l - __f;
543 if (__n > __bs)
545 __n = __bs;
546 __m = __f + __n;
550 __r += __n;
564 difference_type __n = __l - __f;
565 while (__n > 0)
570 if (__bs > __n)
572 __bs = __n;
576 __n -= __bs;
591 difference_type __n = __l - __f;
592 while (__n > 0)
597 if (__bs > __n)
599 __bs = __n;
603 __n -= __bs;
627 difference_type __n = __l - __f;
629 if (__n > __bs)
631 __n = __bs;
632 __m = __l - __n;
636 __r -= __n;
650 difference_type __n = __l - __f;
651 while (__n > 0)
657 if (__bs > __n)
659 __bs = __n;
663 __n -= __bs;
678 difference_type __n = __l - __f;
679 while (__n > 0)
685 if (__bs > __n)
687 __bs = __n;
691 __n -= __bs;
714 difference_type __n = __l - __f;
716 if (__n > __bs)
718 __n = __bs;
719 __m = __f + __n;
723 __r += __n;
737 difference_type __n = __l - __f;
738 while (__n > 0)
743 if (__bs > __n)
745 __bs = __n;
749 __n -= __bs;
764 difference_type __n = __l - __f;
765 while (__n > 0)
770 if (__bs > __n)
772 __bs = __n;
776 __n -= __bs;
800 difference_type __n = __l - __f;
802 if (__n > __bs)
804 __n = __bs;
805 __m = __l - __n;
809 __r -= __n;
823 difference_type __n = __l - __f;
824 while (__n > 0)
830 if (__bs > __n)
832 __bs = __n;
836 __n -= __bs;
851 difference_type __n = __l - __f;
852 while (__n > 0)
858 if (__bs > __n)
860 __bs = __n;
864 __n -= __bs;
1213 explicit deque(size_type __n);
1215 explicit deque(size_type __n, const _Allocator& __a);
1217 deque(size_type __n, const value_type& __v);
1218 deque(size_type __n, const value_type& __v, const allocator_type& __a);
1253 void assign(size_type __n, const value_type& __v);
1304 void resize(size_type __n);
1305 void resize(size_type __n, const value_type& __v);
1334 iterator insert(const_iterator __p, size_type __n, const value_type& __v);
1367 static size_type __recommend_blocks(size_type __n)
1369 return __n / __base::__block_size + (__n % __base::__block_size != 0);
1394 void __append(size_type __n);
1395 void __append(size_type __n, const value_type& __v);
1398 void __add_front_capacity(size_type __n);
1400 void __add_back_capacity(size_type __n);
1437 deque<_Tp, _Allocator>::deque(size_type __n)
1439 if (__n > 0)
1440 __append(__n);
1445 deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
1448 if (__n > 0)
1449 __append(__n);
1454 deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v)
1456 if (__n > 0)
1457 __append(__n, __v);
1461 deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v, const allocator_type& __a)
1464 if (__n > 0)
1465 __append(__n, __v);
1622 deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v)
1624 if (__n > __base::size())
1627 __n -= __base::size();
1628 __append(__n, __v);
1631 __erase_to_end(_VSTD::fill_n(__base::begin(), __n, __v));
1644 deque<_Tp, _Allocator>::resize(size_type __n)
1646 if (__n > __base::size())
1647 __append(__n - __base::size());
1648 else if (__n < __base::size())
1649 __erase_to_end(__base::begin() + __n);
1654 deque<_Tp, _Allocator>::resize(size_type __n, const value_type& __v)
1656 if (__n > __base::size())
1657 __append(__n - __base::size(), __v);
1658 else if (__n < __base::size())
1659 __erase_to_end(__base::begin() + __n);
2043 deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_type& __v)
2050 if (__n > __front_spare())
2051 __add_front_capacity(__n - __front_spare());
2052 // __n <= __front_spare()
2053 size_type __old_n = __n;
2056 if (__n > __pos)
2058 for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
2060 __n = __pos;
2062 if (__n > 0)
2065 iterator __obn = __old_begin + __n;
2067 if (__n < __pos)
2069 _VSTD::fill_n(__old_begin, __n, *__vt);
2075 if (__n > __back_capacity)
2076 __add_back_capacity(__n - __back_capacity);
2077 // __n <= __back_capacity
2078 size_type __old_n = __n;
2082 if (__n > __de)
2084 for (size_type __m = __n - __de; __m; --__m, ++__i, ++__base::size())
2086 __n = __de;
2088 if (__n > 0)
2091 iterator __oen = __old_end - __n;
2093 if (__n < __de)
2095 _VSTD::fill_n(__old_end - __n, __n, *__vt);
2121 size_type __n = _VSTD::distance(__f, __l);
2122 __split_buffer<value_type, allocator_type&> __buf(__n, 0, __base::__alloc());
2134 size_type __n = _VSTD::distance(__f, __l);
2140 if (__n > __front_spare())
2141 __add_front_capacity(__n - __front_spare());
2142 // __n <= __front_spare()
2143 size_type __old_n = __n;
2147 if (__n > __pos)
2149 __m = __pos < __n / 2 ? _VSTD::prev(__l, __pos) : _VSTD::next(__f, __n - __pos);
2152 __n = __pos;
2154 if (__n > 0)
2156 iterator __obn = __old_begin + __n;
2163 if (__n < __pos)
2171 if (__n > __back_capacity)
2172 __add_back_capacity(__n - __back_capacity);
2173 // __n <= __back_capacity
2174 size_type __old_n = __n;
2179 if (__n > __de)
2181 __m = __de < __n / 2 ? _VSTD::next(__f, __de) : _VSTD::prev(__l, __n - __de);
2184 __n = __de;
2186 if (__n > 0)
2188 iterator __oen = __old_end - __n;
2191 if (__n < __de)
2216 size_type __n = _VSTD::distance(__f, __l);
2219 if (__n > __back_capacity)
2220 __add_back_capacity(__n - __back_capacity);
2221 // __n <= __back_capacity
2228 deque<_Tp, _Allocator>::__append(size_type __n)
2232 if (__n > __back_capacity)
2233 __add_back_capacity(__n - __back_capacity);
2234 // __n <= __back_capacity
2235 for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
2241 deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
2245 if (__n > __back_capacity)
2246 __add_back_capacity(__n - __back_capacity);
2247 // __n <= __back_capacity
2248 for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
2317 // Create front capacity for __n elements.
2321 deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
2324 size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
2462 // Create back capacity for __n elements.
2466 deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
2469 size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
2593 difference_type __n = __l - __f;
2594 while (__n > 0)
2599 if (__bs > __n)
2601 __bs = __n;
2607 __n -= __bs;
2623 difference_type __n = __l - __f;
2624 while (__n > 0)
2630 if (__bs > __n)
2632 __bs = __n;
2638 __n -= __bs;
2655 difference_type __n = __l - __f;
2656 while (__n > 0)
2661 if (__bs > __n)
2663 __bs = __n;
2670 __n -= __bs;
2690 difference_type __n = __l - __f;
2691 while (__n > 0)
2697 if (__bs > __n)
2699 __bs = __n;
2710 __n -= __bs;
2719 difference_type __n = 1;
2755 difference_type __n = __l - __f;
2759 if (__n > 0)
2762 if (__pos < (__base::size() - __n) / 2)
2764 iterator __i = _VSTD::move_backward(__b, __p, __p + __n);
2767 __base::size() -= __n;
2768 __base::__start_ += __n;
2778 iterator __i = _VSTD::move(__p + __n, __base::end(), __p);
2781 __base::size() -= __n;
2797 difference_type __n = __e - __f;
2798 if (__n > 0)
2805 __base::size() -= __n;