This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[libstdc++-v3] Remove std::construct and std::destroy



The HP version of the STL used functions construct() and destroy() to construct
and destroy objects.  These functions are not a part of the standard and had
been (mostly) replaced by the internal library functions _Construct() and
_Destroy().

This patch fixes the last few occurrences of the HP legacy functions in the
GCC version of the library and removes their definitions.  There is no change
in functionality or generated code.

The definitions remain available through the backwards headers.

Bootstrapped on an i686-pc-linux-gnu system, no regressions.  Targetted at the
trunk but is good for the 3.01 branch, too.


2001-07-01  Stephen M. Webb <stephen@bregmasoft.com>

    * include/bits/stl_construct.h (construct): Remove.
      (destroy): Remove.
      (__destroy): Replaced by use of iterator_traits.
    * include/bits/stl_deque.h: replaced HP iterator functions with iterator_traits.
	  (construct): changed to _Construct.
      (destroy): changed to _Destroy.
    * include/bits/stl_tempbuf.h: Same.
    * include/bits/stl_tree.h: Same.
    * include/bits/stl_vector.h: Same.
    * include/backward/iterator.h (construct): moved definition to here.
      (destroy): Same.


-- 

Stephen M. Webb
stephen at bregmasoft dot com

Index: include/bits/stl_construct.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_construct.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 stl_construct.h
*** stl_construct.h	2001/06/27 17:09:52	1.7
--- stl_construct.h	2001/07/01 12:47:04
***************
*** 60,148 ****
  #ifndef _CPP_BITS_STL_CONSTRUCT_H
  #define _CPP_BITS_STL_CONSTRUCT_H 1
  
  #include <new>
  
  namespace std
  {
! 
! // construct and destroy.  These functions are not part of the C++ standard,
! // and are provided for backward compatibility with the HP STL. We also
! // provide internal names _Construct and _Destroy that can be used within
! // the library, so that standard-conforming pieces don't have to rely on
! // non-standard extensions.
! 
! // Internal names
! 
! template <class _T1, class _T2>
! inline void _Construct(_T1* __p, const _T2& __value) {
! new ((void*) __p) _T1(__value);
! }
    
! template <class _T1>
! inline void _Construct(_T1* __p) {
!   new ((void*) __p) _T1();
! }
! 
! template <class _Tp>
! inline void _Destroy(_Tp* __pointer) {
!   __pointer->~_Tp();
! }
    
! template <class _ForwardIterator>
! void
! __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
! {
!   for ( ; __first != __last; ++__first)
!     destroy(&*__first);
! }
! 
! template <class _ForwardIterator> 
! inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) {}
! 
! template <class _ForwardIterator, class _Tp>
! inline void 
! __destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*)
! {
!   typedef typename __type_traits<_Tp>::has_trivial_destructor
!           _Trivial_destructor;
!   __destroy_aux(__first, __last, _Trivial_destructor());
! }
! 
! template <class _ForwardIterator>
! inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) {
!   __destroy(__first, __last, __value_type(__first));
! }
! 
! inline void _Destroy(char*, char*) {}
! inline void _Destroy(int*, int*) {}
! inline void _Destroy(long*, long*) {}
! inline void _Destroy(float*, float*) {}
! inline void _Destroy(double*, double*) {}
! inline void _Destroy(wchar_t*, wchar_t*) {}
! 
! // --------------------------------------------------
! // Old names from the HP STL.
! 
! template <class _T1, class _T2>
! inline void construct(_T1* __p, const _T2& __value) {
!   _Construct(__p, __value);
! }
! 
! template <class _T1>
! inline void construct(_T1* __p) {
!   _Construct(__p);
! }
! 
! template <class _Tp>
! inline void destroy(_Tp* __pointer) {
!   _Destroy(__pointer);
! }
! 
! template <class _ForwardIterator>
! inline void destroy(_ForwardIterator __first, _ForwardIterator __last) {
!   _Destroy(__first, __last);
! }
  
  } // namespace std
  
  #endif /* _CPP_BITS_STL_CONSTRUCT_H */
--- 60,144 ----
  #ifndef _CPP_BITS_STL_CONSTRUCT_H
  #define _CPP_BITS_STL_CONSTRUCT_H 1
  
+ #include <bits/type_traits.h>
  #include <new>
  
  namespace std
  {
!   /**
!    * Invoke an allocated object's constructor with an initializer.
!    *
!    * This function is not part of the C++ standard but is used internally
!    * within the library.
!    */
!   template <class _T1, class _T2>
!     inline void
!     _Construct(_T1* __p, const _T2& __value)
!     { new (static_cast<void*>(__p)) _T1(__value); }
    
!   /**
!    * Invoke an allocated object's constructor without an initializer.
!    *
!    * This function is not part of the C++ standard but is used internally
!    * within the library.
!    */
!   template <class _T1>
!     inline void
!     _Construct(_T1* __p)
!     { new (static_cast<void*>(__p)) _T1(); }
! 
!   /**
!    * Destroy a range of objects with nontrivial destructors.  
!    *
!    * This is a helper function used only by _Destroy().
!    */
!   template <class _ForwardIterator>
!     inline void
!     __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
!     { for ( ; __first != __last; ++__first) _Destroy(&*__first); }
! 
!   /**
!    * Destroy a range of objects with trivial destructors.  Since the destructors
!    * are trivial, there's nothing to do and hopefully this function will be
!    * entirely optimized away.
!    *
!    * This is a helper function used only by _Destroy().
!    */
!   template <class _ForwardIterator> 
!     inline void
!     __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
!     { }
! 
!   /**
!    * Destroy the object pointed to by a pointer type.
!    *
!    * This function is not part of the C++ standard but is used internally
!    * within the library.
!    */
!   template <class _Tp>
!     inline void
!     _Destroy(_Tp* __pointer)
!     { __pointer->~_Tp(); }
    
!   /**
!    * Destroy a range of objects.  If the value_type of the object has
!    * a trivial destructor, the compiler should optimize all of this
!    * away, otherwise the objects' destructors must be invoked.
!    *
!    * This function is not part of the C++ standard but is used internally
!    * within the library.
!    */
!   template <class _ForwardIterator>
!     inline void
!     _Destroy(_ForwardIterator __first, _ForwardIterator __last)
!     {
!       typedef typename iterator_traits<_ForwardIterator>::value_type
!                        _Value_type;
!       typedef typename __type_traits<_Value_type>::has_trivial_destructor
!                        _Has_trivial_destructor;
  
+       __destroy_aux(__first, __last, _Has_trivial_destructor());
+     }
  } // namespace std
  
  #endif /* _CPP_BITS_STL_CONSTRUCT_H */
Index: include/bits/stl_deque.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_deque.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 stl_deque.h
*** stl_deque.h	2001/06/27 17:09:52	1.8
--- stl_deque.h	2001/07/01 12:47:24
*************** public:                         // Const
*** 479,508 ****
    deque(size_type __n, const value_type& __value,
          const allocator_type& __a = allocator_type()) : _Base(__a, __n)
      { _M_fill_initialize(__value); }
-   explicit deque(size_type __n) : _Base(allocator_type(), __n)
-     { _M_fill_initialize(value_type()); }
  
!   // Check whether it's an integral type.  If so, it's not an iterator.
!   template <class _InputIterator>
!   deque(_InputIterator __first, _InputIterator __last,
!         const allocator_type& __a = allocator_type()) : _Base(__a) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_initialize_dispatch(__first, __last, _Integral());
!   }
  
!   template <class _Integer>
!   void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) {
!     _M_initialize_map(__n);
!     _M_fill_initialize(__x);
!   }
! 
!   template <class _InputIter>
!   void _M_initialize_dispatch(_InputIter __first, _InputIter __last,
!                               __false_type) {
!     _M_range_initialize(__first, __last, __iterator_category(__first));
!   }
  
!   ~deque() { destroy(_M_start, _M_finish); }
  
    deque& operator= (const deque& __x) {
      const size_type __len = size();
--- 479,518 ----
    deque(size_type __n, const value_type& __value,
          const allocator_type& __a = allocator_type()) : _Base(__a, __n)
      { _M_fill_initialize(__value); }
  
!   explicit
!   deque(size_type __n)
!   : _Base(allocator_type(), __n)
!   { _M_fill_initialize(value_type()); }
  
!   // Check whether it's an integral type.  If so, it's not an iterator.
!   template<class _InputIterator>
!     deque(_InputIterator __first, _InputIterator __last,
!           const allocator_type& __a = allocator_type())
!     : _Base(__a)
!     {
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_initialize_dispatch(__first, __last, _Integral());
!     }
! 
!   template<class _Integer>
!     void
!     _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
!     {
!       _M_initialize_map(__n);
!       _M_fill_initialize(__x);
!     }
! 
!   template<class _InputIter>
!     void
!     _M_initialize_dispatch(_InputIter __first, _InputIter __last, __false_type)
!     {
!       typedef typename iterator_traits<_InputIter>::iterator_category _IterCategory;
!       _M_range_initialize(__first, __last, _IterCategory());
!     }
  
!   ~deque()
!   { _Destroy(_M_start, _M_finish); }
  
    deque& operator= (const deque& __x) {
      const size_type __len = size();
*************** public: 
*** 541,568 ****
        fill(begin(), end(), __val);
      }
    }
- 
-   void assign(size_type __n, const _Tp& __val) {
-     _M_fill_assign(__n, __val);
-   }
  
!   template <class _InputIterator>
!   void assign(_InputIterator __first, _InputIterator __last) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_assign_dispatch(__first, __last, _Integral());
!   }
  
  private:                        // helper functions for assign() 
  
!   template <class _Integer>
!   void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
!     { _M_fill_assign((size_type) __n, (_Tp) __val); }
! 
!   template <class _InputIterator>
!   void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
!                           __false_type) {
!     _M_assign_aux(__first, __last, __iterator_category(__first));
!   }
  
    template <class _InputIterator>
    void _M_assign_aux(_InputIterator __first, _InputIterator __last,
--- 551,583 ----
        fill(begin(), end(), __val);
      }
    }
  
!   void
!   assign(size_type __n, const _Tp& __val)
!   { _M_fill_assign(__n, __val); }
! 
!   template<class _InputIterator>
!     void
!     assign(_InputIterator __first, _InputIterator __last)
!     {
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_assign_dispatch(__first, __last, _Integral());
!     }
  
  private:                        // helper functions for assign() 
  
!   template<class _Integer>
!     void
!     _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
!     { _M_fill_assign(static_cast<size_type>(__n), static_cast<_Tp>(__val)); }
! 
!   template<class _InputIterator>
!     void
!     _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
!     {
!       typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
!       _M_assign_aux(__first, __last, _IterCategory());
!     }
  
    template <class _InputIterator>
    void _M_assign_aux(_InputIterator __first, _InputIterator __last,
*************** private:                        // helpe
*** 585,620 ****
  
  public:                         // push_* and pop_*
    
!   void push_back(const value_type& __t) {
      if (_M_finish._M_cur != _M_finish._M_last - 1) {
!       construct(_M_finish._M_cur, __t);
        ++_M_finish._M_cur;
      }
      else
        _M_push_back_aux(__t);
    }
  
!   void push_back() {
      if (_M_finish._M_cur != _M_finish._M_last - 1) {
!       construct(_M_finish._M_cur);
        ++_M_finish._M_cur;
      }
      else
        _M_push_back_aux();
    }
  
!   void push_front(const value_type& __t) {
      if (_M_start._M_cur != _M_start._M_first) {
!       construct(_M_start._M_cur - 1, __t);
        --_M_start._M_cur;
      }
      else
        _M_push_front_aux(__t);
    }
  
!   void push_front() {
      if (_M_start._M_cur != _M_start._M_first) {
!       construct(_M_start._M_cur - 1);
        --_M_start._M_cur;
      }
      else
--- 600,643 ----
  
  public:                         // push_* and pop_*
    
!   void
!   push_back(const value_type& __t)
!   {
      if (_M_finish._M_cur != _M_finish._M_last - 1) {
!       _Construct(_M_finish._M_cur, __t);
        ++_M_finish._M_cur;
      }
      else
        _M_push_back_aux(__t);
    }
  
!   void
!   push_back()
!   {
      if (_M_finish._M_cur != _M_finish._M_last - 1) {
!       _Construct(_M_finish._M_cur);
        ++_M_finish._M_cur;
      }
      else
        _M_push_back_aux();
    }
  
!   void
!   push_front(const value_type& __t) 
!   {
      if (_M_start._M_cur != _M_start._M_first) {
!       _Construct(_M_start._M_cur - 1, __t);
        --_M_start._M_cur;
      }
      else
        _M_push_front_aux(__t);
    }
  
!   void
!   push_front()
!   {
      if (_M_start._M_cur != _M_start._M_first) {
!       _Construct(_M_start._M_cur - 1);
        --_M_start._M_cur;
      }
      else
*************** public:                         // push_
*** 622,639 ****
    }
  
  
!   void pop_back() {
      if (_M_finish._M_cur != _M_finish._M_first) {
        --_M_finish._M_cur;
!       destroy(_M_finish._M_cur);
      }
      else
        _M_pop_back_aux();
    }
  
!   void pop_front() {
      if (_M_start._M_cur != _M_start._M_last - 1) {
!       destroy(_M_start._M_cur);
        ++_M_start._M_cur;
      }
      else 
--- 645,666 ----
    }
  
  
!   void
!   pop_back()
!   {
      if (_M_finish._M_cur != _M_finish._M_first) {
        --_M_finish._M_cur;
!       _Destroy(_M_finish._M_cur);
      }
      else
        _M_pop_back_aux();
    }
  
!   void
!   pop_front()
!   {
      if (_M_start._M_cur != _M_start._M_last - 1) {
!       _Destroy(_M_start._M_cur);
        ++_M_start._M_cur;
      }
      else 
*************** public:                         // push_
*** 642,648 ****
  
  public:                         // Insert
  
!   iterator insert(iterator position, const value_type& __x) {
      if (position._M_cur == _M_start._M_cur) {
        push_front(__x);
        return _M_start;
--- 669,677 ----
  
  public:                         // Insert
  
!   iterator
!   insert(iterator position, const value_type& __x)
!   {
      if (position._M_cur == _M_start._M_cur) {
        push_front(__x);
        return _M_start;
*************** public:                         // Inser
*** 658,690 ****
      }
    }
  
!   iterator insert(iterator __position)
!     { return insert(__position, value_type()); }
  
!   void insert(iterator __pos, size_type __n, const value_type& __x)
!     { _M_fill_insert(__pos, __n, __x); }
  
-   void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 
- 
    // Check whether it's an integral type.  If so, it's not an iterator.
!   template <class _InputIterator>
!   void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_insert_dispatch(__pos, __first, __last, _Integral());
!   }
! 
!   template <class _Integer>
!   void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
!                           __true_type) {
!     _M_fill_insert(__pos, (size_type) __n, (value_type) __x);
!   }
! 
!   template <class _InputIterator>
!   void _M_insert_dispatch(iterator __pos,
!                           _InputIterator __first, _InputIterator __last,
!                           __false_type) {
!     insert(__pos, __first, __last, __iterator_category(__first));
!   }
  
    void resize(size_type __new_size, const value_type& __x) {
      const size_type __len = size();
--- 687,726 ----
      }
    }
  
!   iterator
!   insert(iterator __position)
!   { return insert(__position, value_type()); }
! 
!   void
!   insert(iterator __pos, size_type __n, const value_type& __x)
!   { _M_fill_insert(__pos, __n, __x); }
  
!   void
!   _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 
  
    // Check whether it's an integral type.  If so, it's not an iterator.
!   template<class _InputIterator>
!     void
!     insert(iterator __pos, _InputIterator __first, _InputIterator __last)
!     {
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_insert_dispatch(__pos, __first, __last, _Integral());
!     }
! 
!   template<class _Integer>
!     void
!     _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type)
!     { _M_fill_insert(__pos, static_cast<size_type>(__n), static_cast<value_type>(__x)); }
! 
!   template<class _InputIterator>
!     void
!     _M_insert_dispatch(iterator __pos,
!                        _InputIterator __first, _InputIterator __last,
!                        __false_type)
!     {
!       typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
!       insert(__pos, __first, __last, _IterCategory());
!     }
  
    void resize(size_type __new_size, const value_type& __x) {
      const size_type __len = size();
*************** deque<_Tp,_Alloc>::erase(iterator __firs
*** 847,860 ****
      if (static_cast<size_type>(__elems_before) < (size() - __n) / 2) {
        copy_backward(_M_start, __first, __last);
        iterator __new_start = _M_start + __n;
!       destroy(_M_start, __new_start);
        _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
        _M_start = __new_start;
      }
      else {
        copy(__last, _M_finish, __first);
        iterator __new_finish = _M_finish - __n;
!       destroy(__new_finish, _M_finish);
        _M_destroy_nodes(__new_finish._M_node + 1, _M_finish._M_node + 1);
        _M_finish = __new_finish;
      }
--- 883,896 ----
      if (static_cast<size_type>(__elems_before) < (size() - __n) / 2) {
        copy_backward(_M_start, __first, __last);
        iterator __new_start = _M_start + __n;
!       _Destroy(_M_start, __new_start);
        _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
        _M_start = __new_start;
      }
      else {
        copy(__last, _M_finish, __first);
        iterator __new_finish = _M_finish - __n;
!       _Destroy(__new_finish, _M_finish);
        _M_destroy_nodes(__new_finish._M_node + 1, _M_finish._M_node + 1);
        _M_finish = __new_finish;
      }
*************** void deque<_Tp,_Alloc>::clear()
*** 868,884 ****
    for (_Map_pointer __node = _M_start._M_node + 1;
         __node < _M_finish._M_node;
         ++__node) {
!     destroy(*__node, *__node + _S_buffer_size());
      _M_deallocate_node(*__node);
    }
  
    if (_M_start._M_node != _M_finish._M_node) {
!     destroy(_M_start._M_cur, _M_start._M_last);
!     destroy(_M_finish._M_first, _M_finish._M_cur);
      _M_deallocate_node(_M_finish._M_first);
    }
    else
!     destroy(_M_start._M_cur, _M_finish._M_cur);
  
    _M_finish = _M_start;
  }
--- 904,920 ----
    for (_Map_pointer __node = _M_start._M_node + 1;
         __node < _M_finish._M_node;
         ++__node) {
!     _Destroy(*__node, *__node + _S_buffer_size());
      _M_deallocate_node(*__node);
    }
  
    if (_M_start._M_node != _M_finish._M_node) {
!     _Destroy(_M_start._M_cur, _M_start._M_last);
!     _Destroy(_M_finish._M_first, _M_finish._M_cur);
      _M_deallocate_node(_M_finish._M_first);
    }
    else
!     _Destroy(_M_start._M_cur, _M_finish._M_cur);
  
    _M_finish = _M_start;
  }
*************** void deque<_Tp,_Alloc>::_M_fill_initiali
*** 893,899 ****
        uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
      uninitialized_fill(_M_finish._M_first, _M_finish._M_cur, __value);
    }
!   __STL_UNWIND(destroy(_M_start, iterator(*__cur, __cur)));
  }
  
  template <class _Tp, class _Alloc> template <class _InputIterator>
--- 929,935 ----
        uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
      uninitialized_fill(_M_finish._M_first, _M_finish._M_cur, __value);
    }
!   __STL_UNWIND(_Destroy(_M_start, iterator(*__cur, __cur)));
  }
  
  template <class _Tp, class _Alloc> template <class _InputIterator>
*************** void deque<_Tp,_Alloc>::_M_range_initial
*** 930,947 ****
      }
      uninitialized_copy(__first, __last, _M_finish._M_first);
    }
!   __STL_UNWIND(destroy(_M_start, iterator(*__cur_node, __cur_node)));
  }
  
  // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
  template <class _Tp, class _Alloc>
! void deque<_Tp,_Alloc>::_M_push_back_aux(const value_type& __t)
  {
    value_type __t_copy = __t;
    _M_reserve_map_at_back();
    *(_M_finish._M_node + 1) = _M_allocate_node();
    __STL_TRY {
!     construct(_M_finish._M_cur, __t_copy);
      _M_finish._M_set_node(_M_finish._M_node + 1);
      _M_finish._M_cur = _M_finish._M_first;
    }
--- 966,984 ----
      }
      uninitialized_copy(__first, __last, _M_finish._M_first);
    }
!   __STL_UNWIND(_Destroy(_M_start, iterator(*__cur_node, __cur_node)));
  }
  
  // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
  template <class _Tp, class _Alloc>
! void
! deque<_Tp,_Alloc>::_M_push_back_aux(const value_type& __t)
  {
    value_type __t_copy = __t;
    _M_reserve_map_at_back();
    *(_M_finish._M_node + 1) = _M_allocate_node();
    __STL_TRY {
!     _Construct(_M_finish._M_cur, __t_copy);
      _M_finish._M_set_node(_M_finish._M_node + 1);
      _M_finish._M_cur = _M_finish._M_first;
    }
*************** void deque<_Tp,_Alloc>::_M_push_back_aux
*** 950,961 ****
  
  // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
  template <class _Tp, class _Alloc>
! void deque<_Tp,_Alloc>::_M_push_back_aux()
  {
    _M_reserve_map_at_back();
    *(_M_finish._M_node + 1) = _M_allocate_node();
    __STL_TRY {
!     construct(_M_finish._M_cur);
      _M_finish._M_set_node(_M_finish._M_node + 1);
      _M_finish._M_cur = _M_finish._M_first;
    }
--- 987,999 ----
  
  // Called only if _M_finish._M_cur == _M_finish._M_last - 1.
  template <class _Tp, class _Alloc>
! void
! deque<_Tp,_Alloc>::_M_push_back_aux()
  {
    _M_reserve_map_at_back();
    *(_M_finish._M_node + 1) = _M_allocate_node();
    __STL_TRY {
!     _Construct(_M_finish._M_cur);
      _M_finish._M_set_node(_M_finish._M_node + 1);
      _M_finish._M_cur = _M_finish._M_first;
    }
*************** void deque<_Tp,_Alloc>::_M_push_back_aux
*** 964,970 ****
  
  // Called only if _M_start._M_cur == _M_start._M_first.
  template <class _Tp, class _Alloc>
! void  deque<_Tp,_Alloc>::_M_push_front_aux(const value_type& __t)
  {
    value_type __t_copy = __t;
    _M_reserve_map_at_front();
--- 1002,1009 ----
  
  // Called only if _M_start._M_cur == _M_start._M_first.
  template <class _Tp, class _Alloc>
! void
! deque<_Tp,_Alloc>::_M_push_front_aux(const value_type& __t)
  {
    value_type __t_copy = __t;
    _M_reserve_map_at_front();
*************** void  deque<_Tp,_Alloc>::_M_push_front_a
*** 972,992 ****
    __STL_TRY {
      _M_start._M_set_node(_M_start._M_node - 1);
      _M_start._M_cur = _M_start._M_last - 1;
!     construct(_M_start._M_cur, __t_copy);
    }
    __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1))));
  } 
  
  // Called only if _M_start._M_cur == _M_start._M_first.
  template <class _Tp, class _Alloc>
! void deque<_Tp,_Alloc>::_M_push_front_aux()
  {
    _M_reserve_map_at_front();
    *(_M_start._M_node - 1) = _M_allocate_node();
    __STL_TRY {
      _M_start._M_set_node(_M_start._M_node - 1);
      _M_start._M_cur = _M_start._M_last - 1;
!     construct(_M_start._M_cur);
    }
    __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1))));
  } 
--- 1011,1032 ----
    __STL_TRY {
      _M_start._M_set_node(_M_start._M_node - 1);
      _M_start._M_cur = _M_start._M_last - 1;
!     _Construct(_M_start._M_cur, __t_copy);
    }
    __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1))));
  } 
  
  // Called only if _M_start._M_cur == _M_start._M_first.
  template <class _Tp, class _Alloc>
! void
! deque<_Tp,_Alloc>::_M_push_front_aux()
  {
    _M_reserve_map_at_front();
    *(_M_start._M_node - 1) = _M_allocate_node();
    __STL_TRY {
      _M_start._M_set_node(_M_start._M_node - 1);
      _M_start._M_cur = _M_start._M_last - 1;
!     _Construct(_M_start._M_cur);
    }
    __STL_UNWIND((++_M_start, _M_deallocate_node(*(_M_start._M_node - 1))));
  } 
*************** void deque<_Tp,_Alloc>::_M_pop_back_aux(
*** 998,1004 ****
    _M_deallocate_node(_M_finish._M_first);
    _M_finish._M_set_node(_M_finish._M_node - 1);
    _M_finish._M_cur = _M_finish._M_last - 1;
!   destroy(_M_finish._M_cur);
  }
  
  // Called only if _M_start._M_cur == _M_start._M_last - 1.  Note that 
--- 1038,1044 ----
    _M_deallocate_node(_M_finish._M_first);
    _M_finish._M_set_node(_M_finish._M_node - 1);
    _M_finish._M_cur = _M_finish._M_last - 1;
!   _Destroy(_M_finish._M_cur);
  }
  
  // Called only if _M_start._M_cur == _M_start._M_last - 1.  Note that 
*************** void deque<_Tp,_Alloc>::_M_pop_back_aux(
*** 1008,1014 ****
  template <class _Tp, class _Alloc>
  void deque<_Tp,_Alloc>::_M_pop_front_aux()
  {
!   destroy(_M_start._M_cur);
    _M_deallocate_node(_M_start._M_first);
    _M_start._M_set_node(_M_start._M_node + 1);
    _M_start._M_cur = _M_start._M_first;
--- 1048,1054 ----
  template <class _Tp, class _Alloc>
  void deque<_Tp,_Alloc>::_M_pop_front_aux()
  {
!   _Destroy(_M_start._M_cur);
    _M_deallocate_node(_M_start._M_first);
    _M_start._M_set_node(_M_start._M_node + 1);
    _M_start._M_cur = _M_start._M_first;
Index: include/bits/stl_tempbuf.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_tempbuf.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 stl_tempbuf.h
*** stl_tempbuf.h	2001/06/27 17:09:52	1.5
--- stl_tempbuf.h	2001/07/01 12:47:27
*************** public:
*** 149,155 ****
    }
   
    ~_Temporary_buffer() {  
!     destroy(_M_buffer, _M_buffer + _M_len);
      free(_M_buffer);
    }
  
--- 149,155 ----
    }
   
    ~_Temporary_buffer() {  
!     _Destroy(_M_buffer, _M_buffer + _M_len);
      free(_M_buffer);
    }
  
Index: include/bits/stl_tree.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_tree.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 stl_tree.h
*** stl_tree.h	2001/06/27 17:09:52	1.6
--- stl_tree.h	2001/07/01 12:47:36
*************** protected:
*** 552,562 ****
  
  protected:
  
!   _Link_type _M_create_node(const value_type& __x)
    {
      _Link_type __tmp = _M_get_node();
      __STL_TRY {
!       construct(&__tmp->_M_value_field, __x);
      }
      __STL_UNWIND(_M_put_node(__tmp));
      return __tmp;
--- 552,563 ----
  
  protected:
  
!   _Link_type
!   _M_create_node(const value_type& __x)
    {
      _Link_type __tmp = _M_get_node();
      __STL_TRY {
!       _Construct(&__tmp->_M_value_field, __x);
      }
      __STL_UNWIND(_M_put_node(__tmp));
      return __tmp;
*************** protected:
*** 571,579 ****
      return __tmp;
    }
  
!   void destroy_node(_Link_type __p)
    {
!     destroy(&__p->_M_value_field);
      _M_put_node(__p);
    }
  
--- 572,581 ----
      return __tmp;
    }
  
!   void
!   destroy_node(_Link_type __p)
    {
!     _Destroy(&__p->_M_value_field);
      _M_put_node(__p);
    }
  
Index: include/bits/stl_vector.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_vector.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 stl_vector.h
*** stl_vector.h	2001/06/27 17:09:52	1.8
--- stl_vector.h	2001/07/01 12:47:41
*************** public:
*** 236,268 ****
  
    // Check whether it's an integral type.  If so, it's not an iterator.
    template <class _InputIterator>
!   vector(_InputIterator __first, _InputIterator __last,
!          const allocator_type& __a = allocator_type()) : _Base(__a) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_initialize_aux(__first, __last, _Integral());
!   }
  
    template <class _Integer>
!   void _M_initialize_aux(_Integer __n, _Integer __value, __true_type) {
!     _M_start = _M_allocate(__n);
!     _M_end_of_storage = _M_start + __n; 
!     _M_finish = uninitialized_fill_n(_M_start, __n, __value);
!   }
! 
!   template <class _InputIterator>
!   void _M_initialize_aux(_InputIterator __first, _InputIterator __last,
!                          __false_type) {
!     _M_range_initialize(__first, __last, __iterator_category(__first));
!   }
  
!   ~vector() { destroy(_M_start, _M_finish); }
  
    vector<_Tp, _Alloc>& operator=(const vector<_Tp, _Alloc>& __x);
    void reserve(size_type __n) {
      if (capacity() < __n) {
        const size_type __old_size = size();
        pointer __tmp = _M_allocate_and_copy(__n, _M_start, _M_finish);
!       destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __tmp;
        _M_finish = __tmp + __old_size;
--- 236,274 ----
  
    // Check whether it's an integral type.  If so, it's not an iterator.
    template <class _InputIterator>
!     vector(_InputIterator __first, _InputIterator __last,
!            const allocator_type& __a = allocator_type())
! 	: _Base(__a)
! 	{
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_initialize_aux(__first, __last, _Integral());
!     }
  
    template <class _Integer>
!     void _M_initialize_aux(_Integer __n, _Integer __value, __true_type)
! 	{
!       _M_start = _M_allocate(__n);
!       _M_end_of_storage = _M_start + __n; 
!       _M_finish = uninitialized_fill_n(_M_start, __n, __value);
!     }
! 
!   template<class _InputIterator>
!     void
! 	_M_initialize_aux(_InputIterator __first, _InputIterator __last, __false_type)
! 	{
! 	  typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategoy;
! 	  _M_range_initialize(__first, __last, _IterCategory());
! 	}
  
!   ~vector()
!   { _Destroy(_M_start, _M_finish); }
  
    vector<_Tp, _Alloc>& operator=(const vector<_Tp, _Alloc>& __x);
    void reserve(size_type __n) {
      if (capacity() < __n) {
        const size_type __old_size = size();
        pointer __tmp = _M_allocate_and_copy(__n, _M_start, _M_finish);
!       _Destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __tmp;
        _M_finish = __tmp + __old_size;
*************** public:
*** 278,296 ****
    void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
    void _M_fill_assign(size_type __n, const _Tp& __val);
  
!   template <class _InputIterator>
!   void assign(_InputIterator __first, _InputIterator __last) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_assign_dispatch(__first, __last, _Integral());
!   }
  
!   template <class _Integer>
!   void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
      { _M_fill_assign((size_type) __n, (_Tp) __val); }
  
!   template <class _InputIter>
!   void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
!     { _M_assign_aux(__first, __last, __iterator_category(__first)); }
  
    template <class _InputIterator>
    void _M_assign_aux(_InputIterator __first, _InputIterator __last,
--- 284,309 ----
    void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
    void _M_fill_assign(size_type __n, const _Tp& __val);
  
!   template<class _InputIterator>
!     void
! 	assign(_InputIterator __first, _InputIterator __last)
! 	{
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_assign_dispatch(__first, __last, _Integral());
!     }
  
!   template<class _Integer>
!     void
! 	_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
      { _M_fill_assign((size_type) __n, (_Tp) __val); }
  
!   template<class _InputIter>
!     void
! 	_M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
!     {
! 	  typedef typename iterator_traits<_InputIter>::iterator_category _IterCategory;
! 	  _M_assign_aux(__first, __last, _IterCategory());
! 	}
  
    template <class _InputIterator>
    void _M_assign_aux(_InputIterator __first, _InputIterator __last,
*************** public:
*** 305,370 ****
    reference back() { return *(end() - 1); }
    const_reference back() const { return *(end() - 1); }
  
!   void push_back(const _Tp& __x) {
      if (_M_finish != _M_end_of_storage) {
!       construct(_M_finish, __x);
        ++_M_finish;
      }
      else
        _M_insert_aux(end(), __x);
    }
!   void push_back() {
      if (_M_finish != _M_end_of_storage) {
!       construct(_M_finish);
        ++_M_finish;
      }
      else
        _M_insert_aux(end());
    }
!   void swap(vector<_Tp, _Alloc>& __x) {
      std::swap(_M_start, __x._M_start);
      std::swap(_M_finish, __x._M_finish);
      std::swap(_M_end_of_storage, __x._M_end_of_storage);
    }
  
!   iterator insert(iterator __position, const _Tp& __x) {
      size_type __n = __position - begin();
      if (_M_finish != _M_end_of_storage && __position == end()) {
!       construct(_M_finish, __x);
        ++_M_finish;
      }
      else
        _M_insert_aux(iterator(__position), __x);
      return begin() + __n;
    }
!   iterator insert(iterator __position) {
      size_type __n = __position - begin();
      if (_M_finish != _M_end_of_storage && __position == end()) {
!       construct(_M_finish);
        ++_M_finish;
      }
      else
        _M_insert_aux(iterator(__position));
      return begin() + __n;
    }
    // Check whether it's an integral type.  If so, it's not an iterator.
!   template <class _InputIterator>
!   void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
!     typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!     _M_insert_dispatch(__pos, __first, __last, _Integral());
!   }
  
    template <class _Integer>
!   void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
!                           __true_type)
!     { _M_fill_insert(__pos, (size_type) __n, (_Tp) __val); }
! 
!   template <class _InputIterator>
!   void _M_insert_dispatch(iterator __pos,
!                           _InputIterator __first, _InputIterator __last,
!                           __false_type) {
!     _M_range_insert(__pos, __first, __last, __iterator_category(__first));
!   }
  
    void insert (iterator __pos, size_type __n, const _Tp& __x)
      { _M_fill_insert(__pos, __n, __x); }
--- 318,402 ----
    reference back() { return *(end() - 1); }
    const_reference back() const { return *(end() - 1); }
  
!   void
!   push_back(const _Tp& __x)
!   {
      if (_M_finish != _M_end_of_storage) {
!       _Construct(_M_finish, __x);
        ++_M_finish;
      }
      else
        _M_insert_aux(end(), __x);
    }
! 
!   void
!   push_back()
!   {
      if (_M_finish != _M_end_of_storage) {
!       _Construct(_M_finish);
        ++_M_finish;
      }
      else
        _M_insert_aux(end());
    }
! 
!   void
!   swap(vector<_Tp, _Alloc>& __x)
!   {
      std::swap(_M_start, __x._M_start);
      std::swap(_M_finish, __x._M_finish);
      std::swap(_M_end_of_storage, __x._M_end_of_storage);
    }
  
!   iterator
!   insert(iterator __position, const _Tp& __x)
!   {
      size_type __n = __position - begin();
      if (_M_finish != _M_end_of_storage && __position == end()) {
!       _Construct(_M_finish, __x);
        ++_M_finish;
      }
      else
        _M_insert_aux(iterator(__position), __x);
      return begin() + __n;
    }
! 
!   iterator
!   insert(iterator __position)
!   {
      size_type __n = __position - begin();
      if (_M_finish != _M_end_of_storage && __position == end()) {
!       _Construct(_M_finish);
        ++_M_finish;
      }
      else
        _M_insert_aux(iterator(__position));
      return begin() + __n;
    }
+ 
    // Check whether it's an integral type.  If so, it's not an iterator.
!   template<class _InputIterator>
!     void
! 	insert(iterator __pos, _InputIterator __first, _InputIterator __last)
! 	{
!       typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
!       _M_insert_dispatch(__pos, __first, __last, _Integral());
!     }
  
    template <class _Integer>
!     void
! 	_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type)
!     { _M_fill_insert(__pos, static_cast<size_type>(__n), static_cast<_Tp>(__val)); }
! 
!   template<class _InputIterator>
!     void
! 	_M_insert_dispatch(iterator __pos,
!                        _InputIterator __first, _InputIterator __last,
!                        __false_type)
! 	{
! 	  typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
!       _M_range_insert(__pos, __first, __last, _IterCategory());
!     }
  
    void insert (iterator __pos, size_type __n, const _Tp& __x)
      { _M_fill_insert(__pos, __n, __x); }
*************** public:
*** 373,390 ****
  
    void pop_back() {
      --_M_finish;
!     destroy(_M_finish);
    }
    iterator erase(iterator __position) {
      if (__position + 1 != end())
        copy(__position + 1, end(), __position);
      --_M_finish;
!     destroy(_M_finish);
      return __position;
    }
    iterator erase(iterator __first, iterator __last) {
      iterator __i(copy(__last, end(), __first));
!     destroy(__i, end());
      _M_finish = _M_finish - (__last - __first);
      return __first;
    }
--- 405,422 ----
  
    void pop_back() {
      --_M_finish;
!     _Destroy(_M_finish);
    }
    iterator erase(iterator __position) {
      if (__position + 1 != end())
        copy(__position + 1, end(), __position);
      --_M_finish;
!     _Destroy(_M_finish);
      return __position;
    }
    iterator erase(iterator __first, iterator __last) {
      iterator __i(copy(__last, end(), __first));
!     _Destroy(__i, end());
      _M_finish = _M_finish - (__last - __first);
      return __first;
    }
*************** vector<_Tp,_Alloc>::operator=(const vect
*** 497,510 ****
      const size_type __xlen = __x.size();
      if (__xlen > capacity()) {
        pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end());
!       destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __tmp;
        _M_end_of_storage = _M_start + __xlen;
      }
      else if (size() >= __xlen) {
        iterator __i(copy(__x.begin(), __x.end(), begin()));
!       destroy(__i, end());
      }
      else {
        copy(__x.begin(), __x.begin() + size(), _M_start);
--- 529,542 ----
      const size_type __xlen = __x.size();
      if (__xlen > capacity()) {
        pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end());
!       _Destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __tmp;
        _M_end_of_storage = _M_start + __xlen;
      }
      else if (size() >= __xlen) {
        iterator __i(copy(__x.begin(), __x.end(), begin()));
!       _Destroy(__i, end());
      }
      else {
        copy(__x.begin(), __x.begin() + size(), _M_start);
*************** vector<_Tp, _Alloc>::_M_assign_aux(_Forw
*** 551,564 ****
  
    if (__len > capacity()) {
      pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
!     destroy(_M_start, _M_finish);
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __tmp;
      _M_end_of_storage = _M_finish = _M_start + __len;
    }
    else if (size() >= __len) {
      iterator __new_finish(copy(__first, __last, _M_start));
!     destroy(__new_finish, end());
      _M_finish = __new_finish.base();
    }
    else {
--- 583,596 ----
  
    if (__len > capacity()) {
      pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
!     _Destroy(_M_start, _M_finish);
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __tmp;
      _M_end_of_storage = _M_finish = _M_start + __len;
    }
    else if (size() >= __len) {
      iterator __new_finish(copy(__first, __last, _M_start));
!     _Destroy(__new_finish, end());
      _M_finish = __new_finish.base();
    }
    else {
*************** void 
*** 574,580 ****
  vector<_Tp, _Alloc>::_M_insert_aux(iterator __position, const _Tp& __x)
  {
    if (_M_finish != _M_end_of_storage) {
!     construct(_M_finish, *(_M_finish - 1));
      ++_M_finish;
      _Tp __x_copy = __x;
      copy_backward(__position, iterator(_M_finish - 2), iterator(_M_finish- 1));
--- 606,612 ----
  vector<_Tp, _Alloc>::_M_insert_aux(iterator __position, const _Tp& __x)
  {
    if (_M_finish != _M_end_of_storage) {
!     _Construct(_M_finish, *(_M_finish - 1));
      ++_M_finish;
      _Tp __x_copy = __x;
      copy_backward(__position, iterator(_M_finish - 2), iterator(_M_finish- 1));
*************** vector<_Tp, _Alloc>::_M_insert_aux(itera
*** 588,601 ****
      __STL_TRY {
        __new_finish = uninitialized_copy(iterator(_M_start), __position,
                                          __new_start);
!       construct(__new_finish.base(), __x);
        ++__new_finish;
        __new_finish = uninitialized_copy(__position, iterator(_M_finish),
                                          __new_finish);
      }
!     __STL_UNWIND((destroy(__new_start,__new_finish), 
                    _M_deallocate(__new_start.base(),__len)));
!     destroy(begin(), end());
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __new_start.base();
      _M_finish = __new_finish.base();
--- 620,633 ----
      __STL_TRY {
        __new_finish = uninitialized_copy(iterator(_M_start), __position,
                                          __new_start);
!       _Construct(__new_finish.base(), __x);
        ++__new_finish;
        __new_finish = uninitialized_copy(__position, iterator(_M_finish),
                                          __new_finish);
      }
!     __STL_UNWIND((_Destroy(__new_start,__new_finish), 
                    _M_deallocate(__new_start.base(),__len)));
!     _Destroy(begin(), end());
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __new_start.base();
      _M_finish = __new_finish.base();
*************** void 
*** 608,614 ****
  vector<_Tp, _Alloc>::_M_insert_aux(iterator __position)
  {
    if (_M_finish != _M_end_of_storage) {
!     construct(_M_finish, *(_M_finish - 1));
      ++_M_finish;
      copy_backward(__position, iterator(_M_finish - 2), 
  		  iterator(_M_finish - 1));
--- 640,646 ----
  vector<_Tp, _Alloc>::_M_insert_aux(iterator __position)
  {
    if (_M_finish != _M_end_of_storage) {
!     _Construct(_M_finish, *(_M_finish - 1));
      ++_M_finish;
      copy_backward(__position, iterator(_M_finish - 2), 
  		  iterator(_M_finish - 1));
*************** vector<_Tp, _Alloc>::_M_insert_aux(itera
*** 622,635 ****
      __STL_TRY {
        __new_finish = uninitialized_copy(iterator(_M_start), __position, 
  					__new_start);
!       construct(__new_finish);
        ++__new_finish;
        __new_finish = uninitialized_copy(__position, iterator(_M_finish), 
  					__new_finish);
      }
!     __STL_UNWIND((destroy(__new_start,__new_finish), 
                    _M_deallocate(__new_start,__len)));
!     destroy(begin(), end());
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __new_start;
      _M_finish = __new_finish;
--- 654,667 ----
      __STL_TRY {
        __new_finish = uninitialized_copy(iterator(_M_start), __position, 
  					__new_start);
!       _Construct(__new_finish);
        ++__new_finish;
        __new_finish = uninitialized_copy(__position, iterator(_M_finish), 
  					__new_finish);
      }
!     __STL_UNWIND((_Destroy(__new_start,__new_finish), 
                    _M_deallocate(__new_start,__len)));
!     _Destroy(begin(), end());
      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
      _M_start = __new_start;
      _M_finish = __new_finish;
*************** void vector<_Tp, _Alloc>::_M_fill_insert
*** 671,679 ****
          __new_finish
            = uninitialized_copy(__position, end(), __new_finish);
        }
!       __STL_UNWIND((destroy(__new_start,__new_finish), 
                      _M_deallocate(__new_start.base(),__len)));
!       destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __new_start.base();
        _M_finish = __new_finish.base();
--- 703,711 ----
          __new_finish
            = uninitialized_copy(__position, end(), __new_finish);
        }
!       __STL_UNWIND((_Destroy(__new_start,__new_finish), 
                      _M_deallocate(__new_start.base(),__len)));
!       _Destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __new_start.base();
        _M_finish = __new_finish.base();
*************** vector<_Tp, _Alloc>::_M_range_insert(ite
*** 736,744 ****
          __new_finish
            = uninitialized_copy(__position, iterator(_M_finish), __new_finish);
        }
!       __STL_UNWIND((destroy(__new_start,__new_finish), 
                      _M_deallocate(__new_start.base(),__len)));
!       destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __new_start.base();
        _M_finish = __new_finish.base();
--- 768,776 ----
          __new_finish
            = uninitialized_copy(__position, iterator(_M_finish), __new_finish);
        }
!       __STL_UNWIND((_Destroy(__new_start,__new_finish), 
                      _M_deallocate(__new_start.base(),__len)));
!       _Destroy(_M_start, _M_finish);
        _M_deallocate(_M_start, _M_end_of_storage - _M_start);
        _M_start = __new_start.base();
        _M_finish = __new_finish.base();
Index: include/backward/iterator.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/backward/iterator.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 iterator.h
*** iterator.h	2001/06/27 17:09:52	1.7
--- iterator.h	2001/07/01 12:47:42
***************
*** 1,32 ****
- // Backward-compat support -*- C++ -*-
- 
- // Copyright (C) 2001 Free Software Foundation, Inc.
- //
- // This file is part of the GNU ISO C++ Library.  This library is free
- // software; you can redistribute it and/or modify it under the
- // terms of the GNU General Public License as published by the
- // Free Software Foundation; either version 2, or (at your option)
- // any later version.
- 
- // This library is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- // GNU General Public License for more details.
- 
- // You should have received a copy of the GNU General Public License along
- // with this library; see the file COPYING.  If not, write to the Free
- // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- // USA.
- 
- // As a special exception, you may use this file as part of a free software
- // library without restriction.  Specifically, if other files instantiate
- // templates or use macros or inline functions from this file, or you compile
- // this file and link it with other files to produce an executable, this
- // file does not by itself cause the resulting executable to be covered by
- // the GNU General Public License.  This exception does not however
- // invalidate any other reasons why the executable file might be covered by
- // the GNU General Public License.
- 
  /*
   *
   * Copyright (c) 1994
--- 1,3 ----
*************** using std::istream_iterator;
*** 104,111 ****
  using std::ostream_iterator;
  
  // Names from stl_construct.h
! using std::construct;
! using std::destroy;
  
  // Names from stl_raw_storage_iter.h
  using std::raw_storage_iterator;
--- 75,100 ----
  using std::ostream_iterator;
  
  // Names from stl_construct.h
! template<class _T1, class _T2>
!   inline void
!   construct(_T1* __p, const _T2& __value)
!   { std::_Construct(__p, __value); }
! 
! template<class _T1>
!   inline void
!   construct(_T1* __p)
!   { std::_Construct(__p); }
! 
! template <class _Tp>
!   inline void
!   destroy(_Tp* __pointer)
!   { std::_Destroy(__pointer); }
!   
! template <class _ForwardIterator>
!   inline void
!   destroy(_ForwardIterator __first, _ForwardIterator __last)
!   { std::_Destroy(__first, __last); }
! }
  
  // Names from stl_raw_storage_iter.h
  using std::raw_storage_iterator;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]