1 // Deque implementation (out of line) -*- C++ -*-
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 // Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction. Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License. This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
34 * Hewlett-Packard Company
36 * Permission to use, copy, modify, distribute and sell this software
37 * and its documentation for any purpose is hereby granted without fee,
38 * provided that the above copyright notice appear in all copies and
39 * that both that copyright notice and this permission notice appear
40 * in supporting documentation. Hewlett-Packard Company makes no
41 * representations about the suitability of this software for any
42 * purpose. It is provided "as is" without express or implied warranty.
46 * Silicon Graphics Computer Systems, Inc.
48 * Permission to use, copy, modify, distribute and sell this software
49 * and its documentation for any purpose is hereby granted without fee,
50 * provided that the above copyright notice appear in all copies and
51 * that both that copyright notice and this permission notice appear
52 * in supporting documentation. Silicon Graphics makes no
53 * representations about the suitability of this software for any
54 * purpose. It is provided "as is" without express or implied warranty.
58 * This is an internal header file, included by other library headers.
59 * You should not attempt to use it directly.
65 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
67 template <typename _Tp, typename _Alloc>
70 operator=(const deque& __x)
72 const size_type __len = size();
75 if (__len >= __x.size())
76 _M_erase_at_end(std::copy(__x.begin(), __x.end(),
77 this->_M_impl._M_start));
80 const_iterator __mid = __x.begin() + difference_type(__len);
81 std::copy(__x.begin(), __mid, this->_M_impl._M_start);
82 insert(this->_M_impl._M_finish, __mid, __x.end());
88 template <typename _Tp, typename _Alloc>
89 typename deque<_Tp, _Alloc>::iterator
91 insert(iterator __position, const value_type& __x)
93 if (__position._M_cur == this->_M_impl._M_start._M_cur)
96 return this->_M_impl._M_start;
98 else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
101 iterator __tmp = this->_M_impl._M_finish;
106 return _M_insert_aux(__position, __x);
109 #ifdef __GXX_EXPERIMENTAL_CXX0X__
110 template<typename _Tp, typename _Alloc>
111 template<typename... _Args>
112 typename deque<_Tp, _Alloc>::iterator
114 emplace(iterator __position, _Args&&... __args)
116 if (__position._M_cur == this->_M_impl._M_start._M_cur)
118 push_front(std::forward<_Args>(__args)...);
119 return this->_M_impl._M_start;
121 else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
123 push_back(std::forward<_Args>(__args)...);
124 iterator __tmp = this->_M_impl._M_finish;
129 return _M_insert_aux(__position, std::forward<_Args>(__args)...);
133 template <typename _Tp, typename _Alloc>
134 typename deque<_Tp, _Alloc>::iterator
136 erase(iterator __position)
138 iterator __next = __position;
140 const difference_type __index = __position - begin();
141 if (static_cast<size_type>(__index) < (size() >> 1))
143 if (__position != begin())
144 _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next);
150 _GLIBCXX_MOVE3(__next, end(), __position);
153 return begin() + __index;
156 template <typename _Tp, typename _Alloc>
157 typename deque<_Tp, _Alloc>::iterator
159 erase(iterator __first, iterator __last)
161 if (__first == begin() && __last == end())
168 const difference_type __n = __last - __first;
169 const difference_type __elems_before = __first - begin();
170 if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
172 if (__first != begin())
173 _GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last);
174 _M_erase_at_begin(begin() + __n);
179 _GLIBCXX_MOVE3(__last, end(), __first);
180 _M_erase_at_end(end() - __n);
182 return begin() + __elems_before;
186 template <typename _Tp, class _Alloc>
187 template <typename _InputIterator>
190 _M_assign_aux(_InputIterator __first, _InputIterator __last,
191 std::input_iterator_tag)
193 iterator __cur = begin();
194 for (; __first != __last && __cur != end(); ++__cur, ++__first)
196 if (__first == __last)
197 _M_erase_at_end(__cur);
199 insert(end(), __first, __last);
202 template <typename _Tp, typename _Alloc>
205 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
207 if (__pos._M_cur == this->_M_impl._M_start._M_cur)
209 iterator __new_start = _M_reserve_elements_at_front(__n);
212 std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
213 __x, _M_get_Tp_allocator());
214 this->_M_impl._M_start = __new_start;
218 _M_destroy_nodes(__new_start._M_node,
219 this->_M_impl._M_start._M_node);
220 __throw_exception_again;
223 else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
225 iterator __new_finish = _M_reserve_elements_at_back(__n);
228 std::__uninitialized_fill_a(this->_M_impl._M_finish,
230 _M_get_Tp_allocator());
231 this->_M_impl._M_finish = __new_finish;
235 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
236 __new_finish._M_node + 1);
237 __throw_exception_again;
241 _M_insert_aux(__pos, __n, __x);
244 template <typename _Tp, typename _Alloc>
247 _M_fill_initialize(const value_type& __value)
252 for (__cur = this->_M_impl._M_start._M_node;
253 __cur < this->_M_impl._M_finish._M_node;
255 std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
256 __value, _M_get_Tp_allocator());
257 std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
258 this->_M_impl._M_finish._M_cur,
259 __value, _M_get_Tp_allocator());
263 std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
264 _M_get_Tp_allocator());
265 __throw_exception_again;
269 template <typename _Tp, typename _Alloc>
270 template <typename _InputIterator>
273 _M_range_initialize(_InputIterator __first, _InputIterator __last,
274 std::input_iterator_tag)
276 this->_M_initialize_map(0);
279 for (; __first != __last; ++__first)
285 __throw_exception_again;
289 template <typename _Tp, typename _Alloc>
290 template <typename _ForwardIterator>
293 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
294 std::forward_iterator_tag)
296 const size_type __n = std::distance(__first, __last);
297 this->_M_initialize_map(__n);
299 _Map_pointer __cur_node;
302 for (__cur_node = this->_M_impl._M_start._M_node;
303 __cur_node < this->_M_impl._M_finish._M_node;
306 _ForwardIterator __mid = __first;
307 std::advance(__mid, _S_buffer_size());
308 std::__uninitialized_copy_a(__first, __mid, *__cur_node,
309 _M_get_Tp_allocator());
312 std::__uninitialized_copy_a(__first, __last,
313 this->_M_impl._M_finish._M_first,
314 _M_get_Tp_allocator());
318 std::_Destroy(this->_M_impl._M_start,
319 iterator(*__cur_node, __cur_node),
320 _M_get_Tp_allocator());
321 __throw_exception_again;
325 // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
326 template<typename _Tp, typename _Alloc>
327 #ifdef __GXX_EXPERIMENTAL_CXX0X__
328 template<typename... _Args>
331 _M_push_back_aux(_Args&&... __args)
335 _M_push_back_aux(const value_type& __t)
338 _M_reserve_map_at_back();
339 *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
342 #ifdef __GXX_EXPERIMENTAL_CXX0X__
343 this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
344 std::forward<_Args>(__args)...);
346 this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t);
348 this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
350 this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
354 _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
355 __throw_exception_again;
359 // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
360 template<typename _Tp, typename _Alloc>
361 #ifdef __GXX_EXPERIMENTAL_CXX0X__
362 template<typename... _Args>
365 _M_push_front_aux(_Args&&... __args)
369 _M_push_front_aux(const value_type& __t)
372 _M_reserve_map_at_front();
373 *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
376 this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
378 this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
379 #ifdef __GXX_EXPERIMENTAL_CXX0X__
380 this->_M_impl.construct(this->_M_impl._M_start._M_cur,
381 std::forward<_Args>(__args)...);
383 this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
388 ++this->_M_impl._M_start;
389 _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
390 __throw_exception_again;
394 // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
395 template <typename _Tp, typename _Alloc>
396 void deque<_Tp, _Alloc>::
399 _M_deallocate_node(this->_M_impl._M_finish._M_first);
400 this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
401 this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
402 this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
405 // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1.
406 // Note that if the deque has at least one element (a precondition for this
407 // member function), and if
408 // _M_impl._M_start._M_cur == _M_impl._M_start._M_last,
409 // then the deque must have at least two nodes.
410 template <typename _Tp, typename _Alloc>
411 void deque<_Tp, _Alloc>::
414 this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
415 _M_deallocate_node(this->_M_impl._M_start._M_first);
416 this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
417 this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
420 template <typename _Tp, typename _Alloc>
421 template <typename _InputIterator>
424 _M_range_insert_aux(iterator __pos,
425 _InputIterator __first, _InputIterator __last,
426 std::input_iterator_tag)
427 { std::copy(__first, __last, std::inserter(*this, __pos)); }
429 template <typename _Tp, typename _Alloc>
430 template <typename _ForwardIterator>
433 _M_range_insert_aux(iterator __pos,
434 _ForwardIterator __first, _ForwardIterator __last,
435 std::forward_iterator_tag)
437 const size_type __n = std::distance(__first, __last);
438 if (__pos._M_cur == this->_M_impl._M_start._M_cur)
440 iterator __new_start = _M_reserve_elements_at_front(__n);
443 std::__uninitialized_copy_a(__first, __last, __new_start,
444 _M_get_Tp_allocator());
445 this->_M_impl._M_start = __new_start;
449 _M_destroy_nodes(__new_start._M_node,
450 this->_M_impl._M_start._M_node);
451 __throw_exception_again;
454 else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
456 iterator __new_finish = _M_reserve_elements_at_back(__n);
459 std::__uninitialized_copy_a(__first, __last,
460 this->_M_impl._M_finish,
461 _M_get_Tp_allocator());
462 this->_M_impl._M_finish = __new_finish;
466 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
467 __new_finish._M_node + 1);
468 __throw_exception_again;
472 _M_insert_aux(__pos, __first, __last, __n);
475 template<typename _Tp, typename _Alloc>
476 #ifdef __GXX_EXPERIMENTAL_CXX0X__
477 template<typename... _Args>
478 typename deque<_Tp, _Alloc>::iterator
480 _M_insert_aux(iterator __pos, _Args&&... __args)
482 value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy
484 typename deque<_Tp, _Alloc>::iterator
486 _M_insert_aux(iterator __pos, const value_type& __x)
488 value_type __x_copy = __x; // XXX copy
490 difference_type __index = __pos - this->_M_impl._M_start;
491 if (static_cast<size_type>(__index) < size() / 2)
493 push_front(_GLIBCXX_MOVE(front()));
494 iterator __front1 = this->_M_impl._M_start;
496 iterator __front2 = __front1;
498 __pos = this->_M_impl._M_start + __index;
499 iterator __pos1 = __pos;
501 _GLIBCXX_MOVE3(__front2, __pos1, __front1);
505 push_back(_GLIBCXX_MOVE(back()));
506 iterator __back1 = this->_M_impl._M_finish;
508 iterator __back2 = __back1;
510 __pos = this->_M_impl._M_start + __index;
511 _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1);
513 *__pos = _GLIBCXX_MOVE(__x_copy);
517 template <typename _Tp, typename _Alloc>
520 _M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
522 const difference_type __elems_before = __pos - this->_M_impl._M_start;
523 const size_type __length = this->size();
524 value_type __x_copy = __x;
525 if (__elems_before < difference_type(__length / 2))
527 iterator __new_start = _M_reserve_elements_at_front(__n);
528 iterator __old_start = this->_M_impl._M_start;
529 __pos = this->_M_impl._M_start + __elems_before;
532 if (__elems_before >= difference_type(__n))
534 iterator __start_n = (this->_M_impl._M_start
535 + difference_type(__n));
536 std::__uninitialized_move_a(this->_M_impl._M_start,
537 __start_n, __new_start,
538 _M_get_Tp_allocator());
539 this->_M_impl._M_start = __new_start;
540 _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
541 std::fill(__pos - difference_type(__n), __pos, __x_copy);
545 std::__uninitialized_move_fill(this->_M_impl._M_start,
547 this->_M_impl._M_start,
549 _M_get_Tp_allocator());
550 this->_M_impl._M_start = __new_start;
551 std::fill(__old_start, __pos, __x_copy);
556 _M_destroy_nodes(__new_start._M_node,
557 this->_M_impl._M_start._M_node);
558 __throw_exception_again;
563 iterator __new_finish = _M_reserve_elements_at_back(__n);
564 iterator __old_finish = this->_M_impl._M_finish;
565 const difference_type __elems_after =
566 difference_type(__length) - __elems_before;
567 __pos = this->_M_impl._M_finish - __elems_after;
570 if (__elems_after > difference_type(__n))
572 iterator __finish_n = (this->_M_impl._M_finish
573 - difference_type(__n));
574 std::__uninitialized_move_a(__finish_n,
575 this->_M_impl._M_finish,
576 this->_M_impl._M_finish,
577 _M_get_Tp_allocator());
578 this->_M_impl._M_finish = __new_finish;
579 _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
580 std::fill(__pos, __pos + difference_type(__n), __x_copy);
584 std::__uninitialized_fill_move(this->_M_impl._M_finish,
585 __pos + difference_type(__n),
587 this->_M_impl._M_finish,
588 _M_get_Tp_allocator());
589 this->_M_impl._M_finish = __new_finish;
590 std::fill(__pos, __old_finish, __x_copy);
595 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
596 __new_finish._M_node + 1);
597 __throw_exception_again;
602 template <typename _Tp, typename _Alloc>
603 template <typename _ForwardIterator>
606 _M_insert_aux(iterator __pos,
607 _ForwardIterator __first, _ForwardIterator __last,
610 const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
611 const size_type __length = size();
612 if (static_cast<size_type>(__elemsbefore) < __length / 2)
614 iterator __new_start = _M_reserve_elements_at_front(__n);
615 iterator __old_start = this->_M_impl._M_start;
616 __pos = this->_M_impl._M_start + __elemsbefore;
619 if (__elemsbefore >= difference_type(__n))
621 iterator __start_n = (this->_M_impl._M_start
622 + difference_type(__n));
623 std::__uninitialized_move_a(this->_M_impl._M_start,
624 __start_n, __new_start,
625 _M_get_Tp_allocator());
626 this->_M_impl._M_start = __new_start;
627 _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
628 std::copy(__first, __last, __pos - difference_type(__n));
632 _ForwardIterator __mid = __first;
633 std::advance(__mid, difference_type(__n) - __elemsbefore);
634 std::__uninitialized_move_copy(this->_M_impl._M_start,
635 __pos, __first, __mid,
637 _M_get_Tp_allocator());
638 this->_M_impl._M_start = __new_start;
639 std::copy(__mid, __last, __old_start);
644 _M_destroy_nodes(__new_start._M_node,
645 this->_M_impl._M_start._M_node);
646 __throw_exception_again;
651 iterator __new_finish = _M_reserve_elements_at_back(__n);
652 iterator __old_finish = this->_M_impl._M_finish;
653 const difference_type __elemsafter =
654 difference_type(__length) - __elemsbefore;
655 __pos = this->_M_impl._M_finish - __elemsafter;
658 if (__elemsafter > difference_type(__n))
660 iterator __finish_n = (this->_M_impl._M_finish
661 - difference_type(__n));
662 std::__uninitialized_move_a(__finish_n,
663 this->_M_impl._M_finish,
664 this->_M_impl._M_finish,
665 _M_get_Tp_allocator());
666 this->_M_impl._M_finish = __new_finish;
667 _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
668 std::copy(__first, __last, __pos);
672 _ForwardIterator __mid = __first;
673 std::advance(__mid, __elemsafter);
674 std::__uninitialized_copy_move(__mid, __last, __pos,
675 this->_M_impl._M_finish,
676 this->_M_impl._M_finish,
677 _M_get_Tp_allocator());
678 this->_M_impl._M_finish = __new_finish;
679 std::copy(__first, __mid, __pos);
684 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
685 __new_finish._M_node + 1);
686 __throw_exception_again;
691 template<typename _Tp, typename _Alloc>
694 _M_destroy_data_aux(iterator __first, iterator __last)
696 for (_Map_pointer __node = __first._M_node + 1;
697 __node < __last._M_node; ++__node)
698 std::_Destroy(*__node, *__node + _S_buffer_size(),
699 _M_get_Tp_allocator());
701 if (__first._M_node != __last._M_node)
703 std::_Destroy(__first._M_cur, __first._M_last,
704 _M_get_Tp_allocator());
705 std::_Destroy(__last._M_first, __last._M_cur,
706 _M_get_Tp_allocator());
709 std::_Destroy(__first._M_cur, __last._M_cur,
710 _M_get_Tp_allocator());
713 template <typename _Tp, typename _Alloc>
716 _M_new_elements_at_front(size_type __new_elems)
718 if (this->max_size() - this->size() < __new_elems)
719 __throw_length_error(__N("deque::_M_new_elements_at_front"));
721 const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
723 _M_reserve_map_at_front(__new_nodes);
727 for (__i = 1; __i <= __new_nodes; ++__i)
728 *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
732 for (size_type __j = 1; __j < __i; ++__j)
733 _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
734 __throw_exception_again;
738 template <typename _Tp, typename _Alloc>
741 _M_new_elements_at_back(size_type __new_elems)
743 if (this->max_size() - this->size() < __new_elems)
744 __throw_length_error(__N("deque::_M_new_elements_at_back"));
746 const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
748 _M_reserve_map_at_back(__new_nodes);
752 for (__i = 1; __i <= __new_nodes; ++__i)
753 *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
757 for (size_type __j = 1; __j < __i; ++__j)
758 _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
759 __throw_exception_again;
763 template <typename _Tp, typename _Alloc>
766 _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
768 const size_type __old_num_nodes
769 = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
770 const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
772 _Map_pointer __new_nstart;
773 if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
775 __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
776 - __new_num_nodes) / 2
777 + (__add_at_front ? __nodes_to_add : 0);
778 if (__new_nstart < this->_M_impl._M_start._M_node)
779 std::copy(this->_M_impl._M_start._M_node,
780 this->_M_impl._M_finish._M_node + 1,
783 std::copy_backward(this->_M_impl._M_start._M_node,
784 this->_M_impl._M_finish._M_node + 1,
785 __new_nstart + __old_num_nodes);
789 size_type __new_map_size = this->_M_impl._M_map_size
790 + std::max(this->_M_impl._M_map_size,
793 _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
794 __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
795 + (__add_at_front ? __nodes_to_add : 0);
796 std::copy(this->_M_impl._M_start._M_node,
797 this->_M_impl._M_finish._M_node + 1,
799 _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
801 this->_M_impl._M_map = __new_map;
802 this->_M_impl._M_map_size = __new_map_size;
805 this->_M_impl._M_start._M_set_node(__new_nstart);
806 this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
809 // Overload for deque::iterators, exploiting the "segmented-iterator
810 // optimization". NB: leave const_iterators alone!
811 template<typename _Tp>
813 fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
814 const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value)
816 typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
818 for (typename _Self::_Map_pointer __node = __first._M_node + 1;
819 __node < __last._M_node; ++__node)
820 std::fill(*__node, *__node + _Self::_S_buffer_size(), __value);
822 if (__first._M_node != __last._M_node)
824 std::fill(__first._M_cur, __first._M_last, __value);
825 std::fill(__last._M_first, __last._M_cur, __value);
828 std::fill(__first._M_cur, __last._M_cur, __value);
831 _GLIBCXX_END_NESTED_NAMESPACE