OSDN Git Service

2004-03-25 Dhruv Matani <dhruvbird@gmx.net>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / deque.tcc
index a30c851..22fc573 100644 (file)
@@ -72,13 +72,13 @@ namespace __gnu_norm
       if (&__x != this)
        {
          if (__len >= __x.size())
-           erase(std::copy(__x.begin(), __x.end(), this->_M_start),
-                 this->_M_finish);
+           erase(std::copy(__x.begin(), __x.end(), this->_M_impl._M_start),
+                 this->_M_impl._M_finish);
          else
            {
              const_iterator __mid = __x.begin() + difference_type(__len);
-             std::copy(__x.begin(), __mid, this->_M_start);
-             insert(this->_M_finish, __mid, __x.end());
+             std::copy(__x.begin(), __mid, this->_M_impl._M_start);
+             insert(this->_M_impl._M_finish, __mid, __x.end());
            }
        }
       return *this;
@@ -89,15 +89,15 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     insert(iterator position, const value_type& __x)
     {
-      if (position._M_cur == this->_M_start._M_cur)
+      if (position._M_cur == this->_M_impl._M_start._M_cur)
        {
          push_front(__x);
-         return this->_M_start;
+         return this->_M_impl._M_start;
        }
-      else if (position._M_cur == this->_M_finish._M_cur)
+      else if (position._M_cur == this->_M_impl._M_finish._M_cur)
        {
          push_back(__x);
-         iterator __tmp = this->_M_finish;
+         iterator __tmp = this->_M_impl._M_finish;
          --__tmp;
          return __tmp;
        }
@@ -112,18 +112,18 @@ namespace __gnu_norm
     {
       iterator __next = __position;
       ++__next;
-      size_type __index = __position - this->_M_start;
+      size_type __index = __position - this->_M_impl._M_start;
       if (__index < (size() >> 1))
        {
-         std::copy_backward(this->_M_start, __position, __next);
+         std::copy_backward(this->_M_impl._M_start, __position, __next);
          pop_front();
        }
       else
        {
-         std::copy(__next, this->_M_finish, __position);
+         std::copy(__next, this->_M_impl._M_finish, __position);
          pop_back();
        }
-      return this->_M_start + __index;
+      return this->_M_impl._M_start + __index;
     }
 
   template <typename _Tp, typename _Alloc>
@@ -131,33 +131,33 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     erase(iterator __first, iterator __last)
     {
-      if (__first == this->_M_start && __last == this->_M_finish)
+      if (__first == this->_M_impl._M_start && __last == this->_M_impl._M_finish)
        {
          clear();
-         return this->_M_finish;
+         return this->_M_impl._M_finish;
        }
       else
        {
          const difference_type __n = __last - __first;
-         const difference_type __elems_before = __first - this->_M_start;
+         const difference_type __elems_before = __first - this->_M_impl._M_start;
          if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
            {
-             std::copy_backward(this->_M_start, __first, __last);
-             iterator __new_start = this->_M_start + __n;
-             std::_Destroy(this->_M_start, __new_start);
-             _M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
-             this->_M_start = __new_start;
+             std::copy_backward(this->_M_impl._M_start, __first, __last);
+             iterator __new_start = this->_M_impl._M_start + __n;
+             std::_Destroy(this->_M_impl._M_start, __new_start);
+             _M_destroy_nodes(this->_M_impl._M_start._M_node, __new_start._M_node);
+             this->_M_impl._M_start = __new_start;
            }
          else
            {
-             std::copy(__last, this->_M_finish, __first);
-             iterator __new_finish = this->_M_finish - __n;
-             std::_Destroy(__new_finish, this->_M_finish);
+             std::copy(__last, this->_M_impl._M_finish, __first);
+             iterator __new_finish = this->_M_impl._M_finish - __n;
+             std::_Destroy(__new_finish, this->_M_impl._M_finish);
              _M_destroy_nodes(__new_finish._M_node + 1,
-                              this->_M_finish._M_node + 1);
-             this->_M_finish = __new_finish;
+                              this->_M_impl._M_finish._M_node + 1);
+             this->_M_impl._M_finish = __new_finish;
            }
-         return this->_M_start + __elems_before;
+         return this->_M_impl._M_start + __elems_before;
        }
     }
 
@@ -166,24 +166,24 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     clear()
     {
-      for (_Map_pointer __node = this->_M_start._M_node + 1;
-           __node < this->_M_finish._M_node;
+      for (_Map_pointer __node = this->_M_impl._M_start._M_node + 1;
+           __node < this->_M_impl._M_finish._M_node;
            ++__node)
        {
          std::_Destroy(*__node, *__node + _S_buffer_size());
          _M_deallocate_node(*__node);
        }
 
-      if (this->_M_start._M_node != this->_M_finish._M_node)
+      if (this->_M_impl._M_start._M_node != this->_M_impl._M_finish._M_node)
        {
-         std::_Destroy(this->_M_start._M_cur, this->_M_start._M_last);
-         std::_Destroy(this->_M_finish._M_first, this->_M_finish._M_cur);
-         _M_deallocate_node(this->_M_finish._M_first);
+         std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_start._M_last);
+         std::_Destroy(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur);
+         _M_deallocate_node(this->_M_impl._M_finish._M_first);
        }
       else
-        std::_Destroy(this->_M_start._M_cur, this->_M_finish._M_cur);
+        std::_Destroy(this->_M_impl._M_start._M_cur, this->_M_impl._M_finish._M_cur);
 
-      this->_M_finish = this->_M_start;
+      this->_M_impl._M_finish = this->_M_impl._M_start;
     }
 
   template <typename _Tp, class _Alloc>
@@ -207,31 +207,31 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
     {
-      if (__pos._M_cur == this->_M_start._M_cur)
+      if (__pos._M_cur == this->_M_impl._M_start._M_cur)
        {
          iterator __new_start = _M_reserve_elements_at_front(__n);
          try
            {
-             std::uninitialized_fill(__new_start, this->_M_start, __x);
-             this->_M_start = __new_start;
+             std::uninitialized_fill(__new_start, this->_M_impl._M_start, __x);
+             this->_M_impl._M_start = __new_start;
            }
          catch(...)
            {
-             _M_destroy_nodes(__new_start._M_node, this->_M_start._M_node);
+             _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
              __throw_exception_again;
            }
        }
-      else if (__pos._M_cur == this->_M_finish._M_cur)
+      else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
        {
          iterator __new_finish = _M_reserve_elements_at_back(__n);
          try
            {
-             std::uninitialized_fill(this->_M_finish, __new_finish, __x);
-             this->_M_finish = __new_finish;
+             std::uninitialized_fill(this->_M_impl._M_finish, __new_finish, __x);
+             this->_M_impl._M_finish = __new_finish;
            }
          catch(...)
            {
-             _M_destroy_nodes(this->_M_finish._M_node + 1,
+             _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
                               __new_finish._M_node + 1);
              __throw_exception_again;
            }
@@ -248,17 +248,17 @@ namespace __gnu_norm
       _Map_pointer __cur;
       try
         {
-          for (__cur = this->_M_start._M_node;
-              __cur < this->_M_finish._M_node;
+          for (__cur = this->_M_impl._M_start._M_node;
+              __cur < this->_M_impl._M_finish._M_node;
               ++__cur)
             std::uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
-          std::uninitialized_fill(this->_M_finish._M_first,
-                                 this->_M_finish._M_cur,
+          std::uninitialized_fill(this->_M_impl._M_finish._M_first,
+                                 this->_M_impl._M_finish._M_cur,
                                  __value);
         }
       catch(...)
         {
-          std::_Destroy(this->_M_start, iterator(*__cur, __cur));
+          std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur));
           __throw_exception_again;
         }
     }
@@ -296,8 +296,8 @@ namespace __gnu_norm
         _Map_pointer __cur_node;
         try
           {
-            for (__cur_node = this->_M_start._M_node;
-                 __cur_node < this->_M_finish._M_node;
+            for (__cur_node = this->_M_impl._M_start._M_node;
+                 __cur_node < this->_M_impl._M_finish._M_node;
                  ++__cur_node)
             {
               _ForwardIterator __mid = __first;
@@ -305,16 +305,16 @@ namespace __gnu_norm
               std::uninitialized_copy(__first, __mid, *__cur_node);
               __first = __mid;
             }
-            std::uninitialized_copy(__first, __last, this->_M_finish._M_first);
+            std::uninitialized_copy(__first, __last, this->_M_impl._M_finish._M_first);
           }
         catch(...)
           {
-            std::_Destroy(this->_M_start, iterator(*__cur_node, __cur_node));
+            std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node));
             __throw_exception_again;
           }
       }
 
-  // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
+  // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
   template <typename _Tp, typename _Alloc>
     void
     deque<_Tp,_Alloc>::
@@ -322,21 +322,21 @@ namespace __gnu_norm
     {
       value_type __t_copy = __t;
       _M_reserve_map_at_back();
-      *(this->_M_finish._M_node + 1) = this->_M_allocate_node();
+      *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
       try
         {
-          std::_Construct(this->_M_finish._M_cur, __t_copy);
-          this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
-          this->_M_finish._M_cur = this->_M_finish._M_first;
+          std::_Construct(this->_M_impl._M_finish._M_cur, __t_copy);
+          this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + 1);
+          this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
         }
       catch(...)
         {
-          _M_deallocate_node(*(this->_M_finish._M_node + 1));
+          _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
           __throw_exception_again;
         }
     }
 
-  // Called only if _M_start._M_cur == _M_start._M_first.
+  // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
   template <typename _Tp, typename _Alloc>
     void
     deque<_Tp,_Alloc>::
@@ -344,44 +344,44 @@ namespace __gnu_norm
     {
       value_type __t_copy = __t;
       _M_reserve_map_at_front();
-      *(this->_M_start._M_node - 1) = this->_M_allocate_node();
+      *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
       try
         {
-          this->_M_start._M_set_node(this->_M_start._M_node - 1);
-          this->_M_start._M_cur = this->_M_start._M_last - 1;
-          std::_Construct(this->_M_start._M_cur, __t_copy);
+          this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1);
+          this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
+          std::_Construct(this->_M_impl._M_start._M_cur, __t_copy);
         }
       catch(...)
         {
-          ++this->_M_start;
-          _M_deallocate_node(*(this->_M_start._M_node - 1));
+          ++this->_M_impl._M_start;
+          _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
           __throw_exception_again;
         }
     }
 
-  // Called only if _M_finish._M_cur == _M_finish._M_first.
+  // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
   template <typename _Tp, typename _Alloc>
     void deque<_Tp,_Alloc>::
     _M_pop_back_aux()
     {
-      _M_deallocate_node(this->_M_finish._M_first);
-      this->_M_finish._M_set_node(this->_M_finish._M_node - 1);
-      this->_M_finish._M_cur = this->_M_finish._M_last - 1;
-      std::_Destroy(this->_M_finish._M_cur);
+      _M_deallocate_node(this->_M_impl._M_finish._M_first);
+      this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
+      this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
+      std::_Destroy(this->_M_impl._M_finish._M_cur);
     }
 
-  // Called only if _M_start._M_cur == _M_start._M_last - 1.  Note that
+  // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1.  Note that
   // if the deque has at least one element (a precondition for this member
-  // function), and if _M_start._M_cur == _M_start._M_last, then the deque
+  // function), and if _M_impl._M_start._M_cur == _M_impl._M_start._M_last, then the deque
   // must have at least two nodes.
   template <typename _Tp, typename _Alloc>
     void deque<_Tp,_Alloc>::
     _M_pop_front_aux()
     {
-      std::_Destroy(this->_M_start._M_cur);
-      _M_deallocate_node(this->_M_start._M_first);
-      this->_M_start._M_set_node(this->_M_start._M_node + 1);
-      this->_M_start._M_cur = this->_M_start._M_first;
+      std::_Destroy(this->_M_impl._M_start._M_cur);
+      _M_deallocate_node(this->_M_impl._M_start._M_first);
+      this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
+      this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
     }
 
   template <typename _Tp, typename _Alloc>
@@ -402,31 +402,31 @@ namespace __gnu_norm
                           forward_iterator_tag)
       {
         size_type __n = std::distance(__first, __last);
-        if (__pos._M_cur == this->_M_start._M_cur)
+        if (__pos._M_cur == this->_M_impl._M_start._M_cur)
          {
            iterator __new_start = _M_reserve_elements_at_front(__n);
            try
              {
                std::uninitialized_copy(__first, __last, __new_start);
-               this->_M_start = __new_start;
+               this->_M_impl._M_start = __new_start;
              }
            catch(...)
              {
-               _M_destroy_nodes(__new_start._M_node, this->_M_start._M_node);
+               _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
                __throw_exception_again;
              }
          }
-        else if (__pos._M_cur == this->_M_finish._M_cur)
+        else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
          {
            iterator __new_finish = _M_reserve_elements_at_back(__n);
            try
              {
-               std::uninitialized_copy(__first, __last, this->_M_finish);
-               this->_M_finish = __new_finish;
+               std::uninitialized_copy(__first, __last, this->_M_impl._M_finish);
+               this->_M_impl._M_finish = __new_finish;
              }
            catch(...)
              {
-               _M_destroy_nodes(this->_M_finish._M_node + 1,
+               _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
                                 __new_finish._M_node + 1);
                __throw_exception_again;
              }
@@ -440,16 +440,16 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     _M_insert_aux(iterator __pos, const value_type& __x)
     {
-      difference_type __index = __pos - this->_M_start;
+      difference_type __index = __pos - this->_M_impl._M_start;
       value_type __x_copy = __x; // XXX copy
       if (static_cast<size_type>(__index) < size() / 2)
        {
          push_front(front());
-         iterator __front1 = this->_M_start;
+         iterator __front1 = this->_M_impl._M_start;
          ++__front1;
          iterator __front2 = __front1;
          ++__front2;
-         __pos = this->_M_start + __index;
+         __pos = this->_M_impl._M_start + __index;
          iterator __pos1 = __pos;
          ++__pos1;
          std::copy(__front2, __pos1, __front1);
@@ -457,11 +457,11 @@ namespace __gnu_norm
       else
        {
          push_back(back());
-         iterator __back1 = this->_M_finish;
+         iterator __back1 = this->_M_impl._M_finish;
          --__back1;
          iterator __back2 = __back1;
          --__back2;
-         __pos = this->_M_start + __index;
+         __pos = this->_M_impl._M_start + __index;
          std::copy_backward(__pos, __back2, __back1);
        }
       *__pos = __x_copy;
@@ -473,71 +473,71 @@ namespace __gnu_norm
     deque<_Tp,_Alloc>::
     _M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
     {
-      const difference_type __elems_before = __pos - this->_M_start;
+      const difference_type __elems_before = __pos - this->_M_impl._M_start;
       size_type __length = this->size();
       value_type __x_copy = __x;
       if (__elems_before < difference_type(__length / 2))
        {
          iterator __new_start = _M_reserve_elements_at_front(__n);
-         iterator __old_start = this->_M_start;
-         __pos = this->_M_start + __elems_before;
+         iterator __old_start = this->_M_impl._M_start;
+         __pos = this->_M_impl._M_start + __elems_before;
          try
            {
              if (__elems_before >= difference_type(__n))
                {
-                 iterator __start_n = this->_M_start + difference_type(__n);
-                 std::uninitialized_copy(this->_M_start, __start_n,
+                 iterator __start_n = this->_M_impl._M_start + difference_type(__n);
+                 std::uninitialized_copy(this->_M_impl._M_start, __start_n,
                                          __new_start);
-                 this->_M_start = __new_start;
+                 this->_M_impl._M_start = __new_start;
                  std::copy(__start_n, __pos, __old_start);
                  fill(__pos - difference_type(__n), __pos, __x_copy);
                }
              else
                {
-                 std::__uninitialized_copy_fill(this->_M_start, __pos,
+                 std::__uninitialized_copy_fill(this->_M_impl._M_start, __pos,
                                                 __new_start,
-                                                this->_M_start, __x_copy);
-                 this->_M_start = __new_start;
+                                                this->_M_impl._M_start, __x_copy);
+                 this->_M_impl._M_start = __new_start;
                  std::fill(__old_start, __pos, __x_copy);
                }
            }
          catch(...)
            {
-             _M_destroy_nodes(__new_start._M_node, this->_M_start._M_node);
+             _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
              __throw_exception_again;
            }
        }
       else
        {
          iterator __new_finish = _M_reserve_elements_at_back(__n);
-         iterator __old_finish = this->_M_finish;
+         iterator __old_finish = this->_M_impl._M_finish;
          const difference_type __elems_after =
            difference_type(__length) - __elems_before;
-         __pos = this->_M_finish - __elems_after;
+         __pos = this->_M_impl._M_finish - __elems_after;
          try
            {
              if (__elems_after > difference_type(__n))
                {
-                 iterator __finish_n = this->_M_finish - difference_type(__n);
-                 std::uninitialized_copy(__finish_n, this->_M_finish,
-                                         this->_M_finish);
-                 this->_M_finish = __new_finish;
+                 iterator __finish_n = this->_M_impl._M_finish - difference_type(__n);
+                 std::uninitialized_copy(__finish_n, this->_M_impl._M_finish,
+                                         this->_M_impl._M_finish);
+                 this->_M_impl._M_finish = __new_finish;
                  std::copy_backward(__pos, __finish_n, __old_finish);
                  std::fill(__pos, __pos + difference_type(__n), __x_copy);
                }
              else
                {
-                 std::__uninitialized_fill_copy(this->_M_finish,
+                 std::__uninitialized_fill_copy(this->_M_impl._M_finish,
                                                 __pos + difference_type(__n),
                                                 __x_copy, __pos,
-                                                this->_M_finish);
-                 this->_M_finish = __new_finish;
+                                                this->_M_impl._M_finish);
+                 this->_M_impl._M_finish = __new_finish;
                  std::fill(__pos, __old_finish, __x_copy);
                }
            }
          catch(...)
            {
-             _M_destroy_nodes(this->_M_finish._M_node + 1,
+             _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
                               __new_finish._M_node + 1);
              __throw_exception_again;
            }
@@ -552,21 +552,21 @@ namespace __gnu_norm
                     _ForwardIterator __first, _ForwardIterator __last,
                     size_type __n)
       {
-        const difference_type __elemsbefore = __pos - this->_M_start;
+        const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
         size_type __length = size();
         if (static_cast<size_type>(__elemsbefore) < __length / 2)
          {
            iterator __new_start = _M_reserve_elements_at_front(__n);
-           iterator __old_start = this->_M_start;
-           __pos = this->_M_start + __elemsbefore;
+           iterator __old_start = this->_M_impl._M_start;
+           __pos = this->_M_impl._M_start + __elemsbefore;
            try
              {
                if (__elemsbefore >= difference_type(__n))
                  {
-                   iterator __start_n = this->_M_start + difference_type(__n);
-                   std::uninitialized_copy(this->_M_start, __start_n,
+                   iterator __start_n = this->_M_impl._M_start + difference_type(__n);
+                   std::uninitialized_copy(this->_M_impl._M_start, __start_n,
                                            __new_start);
-                   this->_M_start = __new_start;
+                   this->_M_impl._M_start = __new_start;
                    std::copy(__start_n, __pos, __old_start);
                    std::copy(__first, __last, __pos - difference_type(__n));
                  }
@@ -574,34 +574,34 @@ namespace __gnu_norm
                  {
                    _ForwardIterator __mid = __first;
                    std::advance(__mid, difference_type(__n) - __elemsbefore);
-                   std::__uninitialized_copy_copy(this->_M_start, __pos,
+                   std::__uninitialized_copy_copy(this->_M_impl._M_start, __pos,
                                                   __first, __mid, __new_start);
-                   this->_M_start = __new_start;
+                   this->_M_impl._M_start = __new_start;
                    std::copy(__mid, __last, __old_start);
                  }
              }
            catch(...)
              {
-               _M_destroy_nodes(__new_start._M_node, this->_M_start._M_node);
+               _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node);
                __throw_exception_again;
              }
          }
         else
         {
           iterator __new_finish = _M_reserve_elements_at_back(__n);
-          iterator __old_finish = this->_M_finish;
+          iterator __old_finish = this->_M_impl._M_finish;
           const difference_type __elemsafter =
             difference_type(__length) - __elemsbefore;
-          __pos = this->_M_finish - __elemsafter;
+          __pos = this->_M_impl._M_finish - __elemsafter;
           try
             {
               if (__elemsafter > difference_type(__n))
                {
-                 iterator __finish_n = this->_M_finish - difference_type(__n);
+                 iterator __finish_n = this->_M_impl._M_finish - difference_type(__n);
                  std::uninitialized_copy(__finish_n,
-                                         this->_M_finish,
-                                         this->_M_finish);
-                 this->_M_finish = __new_finish;
+                                         this->_M_impl._M_finish,
+                                         this->_M_impl._M_finish);
+                 this->_M_impl._M_finish = __new_finish;
                  std::copy_backward(__pos, __finish_n, __old_finish);
                  std::copy(__first, __last, __pos);
                }
@@ -610,15 +610,15 @@ namespace __gnu_norm
                  _ForwardIterator __mid = __first;
                  std::advance(__mid, __elemsafter);
                  std::__uninitialized_copy_copy(__mid, __last, __pos,
-                                                this->_M_finish,
-                                                this->_M_finish);
-                 this->_M_finish = __new_finish;
+                                                this->_M_impl._M_finish,
+                                                this->_M_impl._M_finish);
+                 this->_M_impl._M_finish = __new_finish;
                  std::copy(__first, __mid, __pos);
                }
             }
           catch(...)
             {
-              _M_destroy_nodes(this->_M_finish._M_node + 1,
+              _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
                               __new_finish._M_node + 1);
               __throw_exception_again;
             }
@@ -637,12 +637,12 @@ namespace __gnu_norm
       try
         {
           for (__i = 1; __i <= __new_nodes; ++__i)
-            *(this->_M_start._M_node - __i) = this->_M_allocate_node();
+            *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
         }
       catch(...)
         {
           for (size_type __j = 1; __j < __i; ++__j)
-            _M_deallocate_node(*(this->_M_start._M_node - __j));
+            _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
           __throw_exception_again;
         }
     }
@@ -659,12 +659,12 @@ namespace __gnu_norm
       try
         {
           for (__i = 1; __i <= __new_nodes; ++__i)
-            *(this->_M_finish._M_node + __i) = this->_M_allocate_node();
+            *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
         }
       catch(...)
         {
           for (size_type __j = 1; __j < __i; ++__j)
-            _M_deallocate_node(*(this->_M_finish._M_node + __j));
+            _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
           __throw_exception_again;
         }
     }
@@ -675,44 +675,44 @@ namespace __gnu_norm
     _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
     {
       size_type __old_num_nodes
-       = this->_M_finish._M_node - this->_M_start._M_node + 1;
+       = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
       size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
 
       _Map_pointer __new_nstart;
-      if (this->_M_map_size > 2 * __new_num_nodes)
+      if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
        {
-         __new_nstart = this->_M_map + (this->_M_map_size
+         __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
                                         - __new_num_nodes) / 2
                         + (__add_at_front ? __nodes_to_add : 0);
-         if (__new_nstart < this->_M_start._M_node)
-           std::copy(this->_M_start._M_node,
-                   this->_M_finish._M_node + 1,
+         if (__new_nstart < this->_M_impl._M_start._M_node)
+           std::copy(this->_M_impl._M_start._M_node,
+                   this->_M_impl._M_finish._M_node + 1,
                    __new_nstart);
          else
-           std::copy_backward(this->_M_start._M_node,
-                              this->_M_finish._M_node + 1,
+           std::copy_backward(this->_M_impl._M_start._M_node,
+                              this->_M_impl._M_finish._M_node + 1,
                               __new_nstart + __old_num_nodes);
        }
       else
        {
-         size_type __new_map_size = this->_M_map_size
-                                    + std::max(this->_M_map_size,
+         size_type __new_map_size = this->_M_impl._M_map_size
+                                    + std::max(this->_M_impl._M_map_size,
                                                __nodes_to_add) + 2;
 
          _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
          __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
                         + (__add_at_front ? __nodes_to_add : 0);
-         std::copy(this->_M_start._M_node,
-                   this->_M_finish._M_node + 1,
+         std::copy(this->_M_impl._M_start._M_node,
+                   this->_M_impl._M_finish._M_node + 1,
                    __new_nstart);
-         _M_deallocate_map(this->_M_map, this->_M_map_size);
+         _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
 
-         this->_M_map = __new_map;
-         this->_M_map_size = __new_map_size;
+         this->_M_impl._M_map = __new_map;
+         this->_M_impl._M_map_size = __new_map_size;
        }
 
-      this->_M_start._M_set_node(__new_nstart);
-      this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+      this->_M_impl._M_start._M_set_node(__new_nstart);
+      this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
     }
 } // namespace __gnu_norm