Lines Matching defs:count

40 //   circular_deque(size_t count);
41 // circular_deque(size_t count, const T& value);
51 // void assign(size_t count, const T& value);
91 // void resize(size_t count, const T& value);
94 // void insert(const_iterator pos, size_type count, const T& value);
421 // Constructs with |count| copies of |value| or default constructed version.
422 circular_deque(size_type count) { resize(count); }
423 circular_deque(size_type count, const T& value) { resize(count, value); }
483 void assign(size_type count, const value_type& value) {
485 reserve(count);
486 for (size_t i = 0; i < count; i++)
626 // constructed version. Even when using resize(count) to shrink, a default
635 void resize(size_type count) {
637 if (count > size()) {
642 ExpandCapacityIfNecessary(count - size());
643 while (size() < count)
645 } else if (count < size()) {
646 size_t new_end = (begin_ + count) % buffer_.capacity();
654 void resize(size_type count, const value_type& value) {
656 if (count > size()) {
657 ExpandCapacityIfNecessary(count - size());
658 while (size() < count)
660 } else if (count < size()) {
661 size_t new_end = (begin_ + count) % buffer_.capacity();
684 void insert(const_iterator pos, size_type count, const T& value) {
689 ExpandCapacityIfNecessary(count);
690 for (size_t i = 0; i < count; i++)
697 MakeRoomFor(count, &insert_cur, &insert_end);
706 // This enable_if keeps this call from getting confused with the (pos, count,
1007 // Makes room for |count| items starting at |*insert_begin|. Since iterators
1011 void MakeRoomFor(size_t count, iterator* insert_begin, iterator* insert_end) {
1012 if (count == 0) {
1019 ExpandCapacityIfNecessary(count);
1023 iterator(this, (insert_begin->index_ + count) % buffer_.capacity());
1027 end_ = (end_ + count) % buffer_.capacity();