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]
Other format: [Raw text]

[Patch] libstdc++/21770


Hi,

the below is the complete patch, changing all the containers as per the
vector preview. Everything went rather smoothly, with small adaptations:
for instance, both list and deque already use rebinds in the base class
but in different ways; map and set are easier, because it suffices to
use the rebinded allocator type for the underlying _Rb_tree. FWIW, the
ext/ container are already ok, same for vector<bool>.

The patch already passed testing on x86 and x86_64-linux,
check/check-performance. I mean to test it somewhat more, wait a day or
two, and then commit it.

Thanks,
Paolo.

///////////////////
2005-06-03  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/21770
	* include/bits/stl_deque.h: Add concept-check. In class _Deque_base
	rebind _Alloc to  _Tp_alloc_type, change _Deque_impl to inherit from
	the latter and add _M_get_Tp_allocator() which returns it. Use
	everywhere _M_get_Tp_allocator() instead of get_allocator().
	* include/bits/deque.tcc: Likewise, use _M_get_Tp_allocator().
	* include/bits/stl_list.h: Add concept-check. In class _List_base
	rebind _Alloc to _Tp_alloc_type and add _M_get_Tp_allocator(), which
	returns the allocator (of type _Node_alloc_type) converted to
	_Tp_alloc_type. Use everywhere _M_get_Tp_allocator() instead of
	get_allocator().
	* include/bits/list.tcc: Likewise, use _M_get_Tp_allocator().
	* include/bits/stl_vector.h: Add concept-check. In class _Vector_base
	rebind _Alloc to _Tp_alloc_type, change _Vector_impl to inherit from
	the latter and add _M_get_Tp_allocator() which returns it. Use
	everywhere _M_get_Tp_allocator() instead of get_allocator().
	* include/bits/vector.tcc: Likewise, use _M_get_Tp_allocator().
	* include/bits/stl_map.h: Add concept-check. Rebind _Alloc to
	_Pair_alloc_type and use it for _Rb_tree.
	* include/bits/stl_multimap.h: Likewise
	* include/bits/stl_multiset.h: Add concept-check. Rebind _Alloc to
	_Key_alloc_type and use it for _Rb_tree.
	* include/bits/stl_set.h: Likewise.
	* testsuite/23_containers/deque/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/deque/explicit_instantiation/1.cc: ... here.
	* testsuite/23_containers/deque/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/list/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/list/explicit_instantiation/1.cc: ... here.
	* testsuite/23_containers/list/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/map/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/map/explicit_instantiation/1.cc: ... here.
	* testsuite/23_containers/map/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/multimap/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/multimap/explicit_instantiation/1.cc: .. here.
	* testsuite/23_containers/multimap/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/multiset/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/multiset/explicit_instantiation/1.cc: .. here.
	* testsuite/23_containers/multiset/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/set/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/set/explicit_instantiation/1.cc: .. here.
	* testsuite/23_containers/set/explicit_instantiation/3.cc: New.
	* testsuite/23_containers/vector/explicit_instantiation.cc: Move to...
	* testsuite/23_containers/vector/explicit_instantiation/1.cc: ... here.
	* testsuite/23_containers/vector/explicit_instantiation/3.cc: New.
diff -prN libstdc++-v3-orig/include/bits/deque.tcc libstdc++-v3/include/bits/deque.tcc
*** libstdc++-v3-orig/include/bits/deque.tcc	Tue May 10 03:58:15 2005
--- libstdc++-v3/include/bits/deque.tcc	Thu Jun  2 17:14:55 2005
*************** namespace _GLIBCXX_STD
*** 147,153 ****
  	      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,
! 			    this->get_allocator());
  	      _M_destroy_nodes(this->_M_impl._M_start._M_node,
  			       __new_start._M_node);
  	      this->_M_impl._M_start = __new_start;
--- 147,153 ----
  	      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_get_Tp_allocator());
  	      _M_destroy_nodes(this->_M_impl._M_start._M_node,
  			       __new_start._M_node);
  	      this->_M_impl._M_start = __new_start;
*************** namespace _GLIBCXX_STD
*** 157,163 ****
  	      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,
! 			    this->get_allocator());
  	      _M_destroy_nodes(__new_finish._M_node + 1,
  			       this->_M_impl._M_finish._M_node + 1);
  	      this->_M_impl._M_finish = __new_finish;
--- 157,163 ----
  	      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_get_Tp_allocator());
  	      _M_destroy_nodes(__new_finish._M_node + 1,
  			       this->_M_impl._M_finish._M_node + 1);
  	      this->_M_impl._M_finish = __new_finish;
*************** namespace _GLIBCXX_STD
*** 176,182 ****
             ++__node)
  	{
  	  std::_Destroy(*__node, *__node + _S_buffer_size(),
! 			this->get_allocator());
  	  _M_deallocate_node(*__node);
  	}
  
--- 176,182 ----
             ++__node)
  	{
  	  std::_Destroy(*__node, *__node + _S_buffer_size(),
! 			_M_get_Tp_allocator());
  	  _M_deallocate_node(*__node);
  	}
  
*************** namespace _GLIBCXX_STD
*** 184,199 ****
  	{
  	  std::_Destroy(this->_M_impl._M_start._M_cur,
  			this->_M_impl._M_start._M_last,
! 			this->get_allocator());
  	  std::_Destroy(this->_M_impl._M_finish._M_first,
  			this->_M_impl._M_finish._M_cur,
! 			this->get_allocator());
  	  _M_deallocate_node(this->_M_impl._M_finish._M_first);
  	}
        else
          std::_Destroy(this->_M_impl._M_start._M_cur,
  		      this->_M_impl._M_finish._M_cur,
! 		      this->get_allocator());
  
        this->_M_impl._M_finish = this->_M_impl._M_start;
      }
--- 184,199 ----
  	{
  	  std::_Destroy(this->_M_impl._M_start._M_cur,
  			this->_M_impl._M_start._M_last,
! 			_M_get_Tp_allocator());
  	  std::_Destroy(this->_M_impl._M_finish._M_first,
  			this->_M_impl._M_finish._M_cur,
! 			_M_get_Tp_allocator());
  	  _M_deallocate_node(this->_M_impl._M_finish._M_first);
  	}
        else
          std::_Destroy(this->_M_impl._M_start._M_cur,
  		      this->_M_impl._M_finish._M_cur,
! 		      _M_get_Tp_allocator());
  
        this->_M_impl._M_finish = this->_M_impl._M_start;
      }
*************** namespace _GLIBCXX_STD
*** 226,232 ****
  	    {
  	      std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
  					  __x,
! 					  this->get_allocator());
  	      this->_M_impl._M_start = __new_start;
  	    }
  	  catch(...)
--- 226,232 ----
  	    {
  	      std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
  					  __x,
! 					  _M_get_Tp_allocator());
  	      this->_M_impl._M_start = __new_start;
  	    }
  	  catch(...)
*************** namespace _GLIBCXX_STD
*** 243,249 ****
  	    {
  	      std::__uninitialized_fill_a(this->_M_impl._M_finish,
  					  __new_finish, __x,
! 					  this->get_allocator());
  	      this->_M_impl._M_finish = __new_finish;
  	    }
  	  catch(...)
--- 243,249 ----
  	    {
  	      std::__uninitialized_fill_a(this->_M_impl._M_finish,
  					  __new_finish, __x,
! 					  _M_get_Tp_allocator());
  	      this->_M_impl._M_finish = __new_finish;
  	    }
  	  catch(...)
*************** namespace _GLIBCXX_STD
*** 269,283 ****
  	       __cur < this->_M_impl._M_finish._M_node;
  	       ++__cur)
              std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
! 					__value, this->get_allocator());
            std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
  				      this->_M_impl._M_finish._M_cur,
! 				      __value, this->get_allocator());
          }
        catch(...)
          {
            std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
! 			this->get_allocator());
            __throw_exception_again;
          }
      }
--- 269,283 ----
  	       __cur < this->_M_impl._M_finish._M_node;
  	       ++__cur)
              std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
! 					__value, _M_get_Tp_allocator());
            std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
  				      this->_M_impl._M_finish._M_cur,
! 				      __value, _M_get_Tp_allocator());
          }
        catch(...)
          {
            std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
! 			_M_get_Tp_allocator());
            __throw_exception_again;
          }
      }
*************** namespace _GLIBCXX_STD
*** 322,339 ****
                _ForwardIterator __mid = __first;
                std::advance(__mid, _S_buffer_size());
                std::__uninitialized_copy_a(__first, __mid, *__cur_node,
! 					  this->get_allocator());
                __first = __mid;
              }
              std::__uninitialized_copy_a(__first, __last,
  					this->_M_impl._M_finish._M_first,
! 					this->get_allocator());
            }
          catch(...)
            {
              std::_Destroy(this->_M_impl._M_start,
  			  iterator(*__cur_node, __cur_node),
! 			  this->get_allocator());
              __throw_exception_again;
            }
        }
--- 322,339 ----
                _ForwardIterator __mid = __first;
                std::advance(__mid, _S_buffer_size());
                std::__uninitialized_copy_a(__first, __mid, *__cur_node,
! 					  _M_get_Tp_allocator());
                __first = __mid;
              }
              std::__uninitialized_copy_a(__first, __last,
  					this->_M_impl._M_finish._M_first,
! 					_M_get_Tp_allocator());
            }
          catch(...)
            {
              std::_Destroy(this->_M_impl._M_start,
  			  iterator(*__cur_node, __cur_node),
! 			  _M_get_Tp_allocator());
              __throw_exception_again;
            }
        }
*************** namespace _GLIBCXX_STD
*** 435,441 ****
  	    try
  	      {
  		std::__uninitialized_copy_a(__first, __last, __new_start,
! 					    this->get_allocator());
  		this->_M_impl._M_start = __new_start;
  	      }
  	    catch(...)
--- 435,441 ----
  	    try
  	      {
  		std::__uninitialized_copy_a(__first, __last, __new_start,
! 					    _M_get_Tp_allocator());
  		this->_M_impl._M_start = __new_start;
  	      }
  	    catch(...)
*************** namespace _GLIBCXX_STD
*** 452,458 ****
  	      {
  		std::__uninitialized_copy_a(__first, __last,
  					    this->_M_impl._M_finish,
! 					    this->get_allocator());
  		this->_M_impl._M_finish = __new_finish;
  	      }
  	    catch(...)
--- 452,458 ----
  	      {
  		std::__uninitialized_copy_a(__first, __last,
  					    this->_M_impl._M_finish,
! 					    _M_get_Tp_allocator());
  		this->_M_impl._M_finish = __new_finish;
  	      }
  	    catch(...)
*************** namespace _GLIBCXX_STD
*** 520,526 ****
  					+ difference_type(__n));
  		  std::__uninitialized_copy_a(this->_M_impl._M_start,
  					      __start_n, __new_start,
! 					      this->get_allocator());
  		  this->_M_impl._M_start = __new_start;
  		  std::copy(__start_n, __pos, __old_start);
  		  fill(__pos - difference_type(__n), __pos, __x_copy);
--- 520,526 ----
  					+ difference_type(__n));
  		  std::__uninitialized_copy_a(this->_M_impl._M_start,
  					      __start_n, __new_start,
! 					      _M_get_Tp_allocator());
  		  this->_M_impl._M_start = __new_start;
  		  std::copy(__start_n, __pos, __old_start);
  		  fill(__pos - difference_type(__n), __pos, __x_copy);
*************** namespace _GLIBCXX_STD
*** 531,537 ****
  						 __pos, __new_start,
  						 this->_M_impl._M_start,
  						 __x_copy,
! 						 this->get_allocator());
  		  this->_M_impl._M_start = __new_start;
  		  std::fill(__old_start, __pos, __x_copy);
  		}
--- 531,537 ----
  						 __pos, __new_start,
  						 this->_M_impl._M_start,
  						 __x_copy,
! 						 _M_get_Tp_allocator());
  		  this->_M_impl._M_start = __new_start;
  		  std::fill(__old_start, __pos, __x_copy);
  		}
*************** namespace _GLIBCXX_STD
*** 559,565 ****
  		  std::__uninitialized_copy_a(__finish_n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      this->get_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy_backward(__pos, __finish_n, __old_finish);
  		  std::fill(__pos, __pos + difference_type(__n), __x_copy);
--- 559,565 ----
  		  std::__uninitialized_copy_a(__finish_n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      _M_get_Tp_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy_backward(__pos, __finish_n, __old_finish);
  		  std::fill(__pos, __pos + difference_type(__n), __x_copy);
*************** namespace _GLIBCXX_STD
*** 570,576 ****
  						 __pos + difference_type(__n),
  						 __x_copy, __pos,
  						 this->_M_impl._M_finish,
! 						 this->get_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::fill(__pos, __old_finish, __x_copy);
  		}
--- 570,576 ----
  						 __pos + difference_type(__n),
  						 __x_copy, __pos,
  						 this->_M_impl._M_finish,
! 						 _M_get_Tp_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::fill(__pos, __old_finish, __x_copy);
  		}
*************** namespace _GLIBCXX_STD
*** 607,613 ****
  					  + difference_type(__n));
  		    std::__uninitialized_copy_a(this->_M_impl._M_start,
  						__start_n, __new_start,
! 						this->get_allocator());
  		    this->_M_impl._M_start = __new_start;
  		    std::copy(__start_n, __pos, __old_start);
  		    std::copy(__first, __last, __pos - difference_type(__n));
--- 607,613 ----
  					  + difference_type(__n));
  		    std::__uninitialized_copy_a(this->_M_impl._M_start,
  						__start_n, __new_start,
! 						_M_get_Tp_allocator());
  		    this->_M_impl._M_start = __new_start;
  		    std::copy(__start_n, __pos, __old_start);
  		    std::copy(__first, __last, __pos - difference_type(__n));
*************** namespace _GLIBCXX_STD
*** 619,625 ****
  		    std::__uninitialized_copy_copy(this->_M_impl._M_start,
  						   __pos, __first, __mid,
  						   __new_start,
! 						   this->get_allocator());
  		    this->_M_impl._M_start = __new_start;
  		    std::copy(__mid, __last, __old_start);
  		  }
--- 619,625 ----
  		    std::__uninitialized_copy_copy(this->_M_impl._M_start,
  						   __pos, __first, __mid,
  						   __new_start,
! 						   _M_get_Tp_allocator());
  		    this->_M_impl._M_start = __new_start;
  		    std::copy(__mid, __last, __old_start);
  		  }
*************** namespace _GLIBCXX_STD
*** 647,653 ****
  		  std::__uninitialized_copy_a(__finish_n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      this->get_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy_backward(__pos, __finish_n, __old_finish);
  		  std::copy(__first, __last, __pos);
--- 647,653 ----
  		  std::__uninitialized_copy_a(__finish_n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      _M_get_Tp_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy_backward(__pos, __finish_n, __old_finish);
  		  std::copy(__first, __last, __pos);
*************** namespace _GLIBCXX_STD
*** 659,665 ****
  		  std::__uninitialized_copy_copy(__mid, __last, __pos,
  						 this->_M_impl._M_finish,
  						 this->_M_impl._M_finish,
! 						 this->get_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy(__first, __mid, __pos);
  		}
--- 659,665 ----
  		  std::__uninitialized_copy_copy(__mid, __last, __pos,
  						 this->_M_impl._M_finish,
  						 this->_M_impl._M_finish,
! 						 _M_get_Tp_allocator());
  		  this->_M_impl._M_finish = __new_finish;
  		  std::copy(__first, __mid, __pos);
  		}
diff -prN libstdc++-v3-orig/include/bits/list.tcc libstdc++-v3/include/bits/list.tcc
*** libstdc++-v3-orig/include/bits/list.tcc	Fri Oct  8 00:44:30 2004
--- libstdc++-v3/include/bits/list.tcc	Thu Jun  2 13:09:10 2005
*************** namespace _GLIBCXX_STD
*** 74,80 ****
  	{
  	  _Node* __tmp = __cur;
  	  __cur = static_cast<_Node*>(__cur->_M_next);
! 	  this->get_allocator().destroy(&__tmp->_M_data);
  	  _M_put_node(__tmp);
  	}
      }
--- 74,80 ----
  	{
  	  _Node* __tmp = __cur;
  	  __cur = static_cast<_Node*>(__cur->_M_next);
! 	  _M_get_Tp_allocator().destroy(&__tmp->_M_data);
  	  _M_put_node(__tmp);
  	}
      }
diff -prN libstdc++-v3-orig/include/bits/stl_deque.h libstdc++-v3/include/bits/stl_deque.h
*** libstdc++-v3-orig/include/bits/stl_deque.h	Tue May 10 03:58:15 2005
--- libstdc++-v3/include/bits/stl_deque.h	Thu Jun  2 20:00:23 2005
*************** namespace _GLIBCXX_STD
*** 358,364 ****
  
        allocator_type
        get_allocator() const
!       { return *static_cast<const _Alloc*>(&this->_M_impl); }
  
        typedef _Deque_iterator<_Tp, _Tp&, _Tp*>             iterator;
        typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
--- 358,364 ----
  
        allocator_type
        get_allocator() const
!       { return _M_get_Tp_allocator(); }
  
        typedef _Deque_iterator<_Tp, _Tp&, _Tp*>             iterator;
        typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
*************** namespace _GLIBCXX_STD
*** 377,406 ****
        //This struct encapsulates the implementation of the std::deque
        //standard container and at the same time makes use of the EBO
        //for empty allocators.
        struct _Deque_impl
!       : public _Alloc
        {
  	_Tp** _M_map;
  	size_t _M_map_size;
  	iterator _M_start;
  	iterator _M_finish;
  
! 	_Deque_impl(const _Alloc& __a)
! 	: _Alloc(__a), _M_map(0), _M_map_size(0), _M_start(), _M_finish()
  	{ }
        };
  
!       typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
!       _Map_alloc_type _M_get_map_allocator() const
!       { return _Map_alloc_type(this->get_allocator()); }
  
        _Tp*
        _M_allocate_node()
!       { return _M_impl._Alloc::allocate(__deque_buf_size(sizeof(_Tp))); }
  
        void
        _M_deallocate_node(_Tp* __p)
!       { _M_impl._Alloc::deallocate(__p, __deque_buf_size(sizeof(_Tp))); }
  
        _Tp**
        _M_allocate_map(size_t __n)
--- 377,419 ----
        //This struct encapsulates the implementation of the std::deque
        //standard container and at the same time makes use of the EBO
        //for empty allocators.
+       typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
+ 
+       typedef typename _Alloc::template rebind<_Tp>::other  _Tp_alloc_type;
+ 
        struct _Deque_impl
!       : public _Tp_alloc_type
        {
  	_Tp** _M_map;
  	size_t _M_map_size;
  	iterator _M_start;
  	iterator _M_finish;
  
! 	_Deque_impl(const _Tp_alloc_type& __a)
! 	: _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
! 	  _M_start(), _M_finish()
  	{ }
        };
  
!       _Tp_alloc_type
!       _M_get_Tp_allocator() const
!       { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
! 
!       _Map_alloc_type
!       _M_get_map_allocator() const
!       { return _M_get_Tp_allocator(); }
  
        _Tp*
        _M_allocate_node()
!       { 
! 	return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
!       }
  
        void
        _M_deallocate_node(_Tp* __p)
!       {
! 	_M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
!       }
  
        _Tp**
        _M_allocate_map(size_t __n)
*************** namespace _GLIBCXX_STD
*** 595,617 ****
      class deque : protected _Deque_base<_Tp, _Alloc>
      {
        // concept requirements
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
  
        typedef _Deque_base<_Tp, _Alloc>           _Base;
  
      public:
!       typedef _Tp                                value_type;
!       typedef typename _Alloc::pointer           pointer;
!       typedef typename _Alloc::const_pointer     const_pointer;
!       typedef typename _Alloc::reference         reference;
!       typedef typename _Alloc::const_reference   const_reference;
!       typedef typename _Base::iterator           iterator;
!       typedef typename _Base::const_iterator     const_iterator;
!       typedef std::reverse_iterator<const_iterator>   const_reverse_iterator;
!       typedef std::reverse_iterator<iterator>         reverse_iterator;
        typedef size_t                             size_type;
        typedef ptrdiff_t                          difference_type;
!       typedef typename _Base::allocator_type     allocator_type;
  
      protected:
        typedef pointer*                           _Map_pointer;
--- 608,633 ----
      class deque : protected _Deque_base<_Tp, _Alloc>
      {
        // concept requirements
+       typedef typename _Alloc::value_type        _Alloc_value_type;
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+       __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
  
        typedef _Deque_base<_Tp, _Alloc>           _Base;
+       typedef typename _Base::_Tp_alloc_type	 _Tp_alloc_type;
  
      public:
!       typedef _Tp                                        value_type;
!       typedef typename _Tp_alloc_type::pointer           pointer;
!       typedef typename _Tp_alloc_type::const_pointer     const_pointer;
!       typedef typename _Tp_alloc_type::reference         reference;
!       typedef typename _Tp_alloc_type::const_reference   const_reference;
!       typedef typename _Base::iterator                   iterator;
!       typedef typename _Base::const_iterator             const_iterator;
!       typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
!       typedef std::reverse_iterator<iterator>            reverse_iterator;
        typedef size_t                             size_type;
        typedef ptrdiff_t                          difference_type;
!       typedef _Alloc                             allocator_type;
  
      protected:
        typedef pointer*                           _Map_pointer;
*************** namespace _GLIBCXX_STD
*** 627,632 ****
--- 643,649 ----
        using _Base::_M_deallocate_node;
        using _Base::_M_allocate_map;
        using _Base::_M_deallocate_map;
+       using _Base::_M_get_Tp_allocator;
  
        /** @if maint
         *  A total of four data members accumulated down the heirarchy.
*************** namespace _GLIBCXX_STD
*** 680,686 ****
        : _Base(__x.get_allocator(), __x.size())
        { std::__uninitialized_copy_a(__x.begin(), __x.end(), 
  				    this->_M_impl._M_start,
! 				    this->get_allocator()); }
  
        /**
         *  @brief  Builds a %deque from a range.
--- 697,703 ----
        : _Base(__x.get_allocator(), __x.size())
        { std::__uninitialized_copy_a(__x.begin(), __x.end(), 
  				    this->_M_impl._M_start,
! 				    _M_get_Tp_allocator()); }
  
        /**
         *  @brief  Builds a %deque from a range.
*************** namespace _GLIBCXX_STD
*** 713,719 ****
         */
        ~deque()
        { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 		      this->get_allocator()); }
  
        /**
         *  @brief  %Deque assignment operator.
--- 730,736 ----
         */
        ~deque()
        { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 		      _M_get_Tp_allocator()); }
  
        /**
         *  @brief  %Deque assignment operator.
diff -prN libstdc++-v3-orig/include/bits/stl_list.h libstdc++-v3/include/bits/stl_list.h
*** libstdc++-v3-orig/include/bits/stl_list.h	Tue May 10 03:58:16 2005
--- libstdc++-v3/include/bits/stl_list.h	Thu Jun  2 19:59:49 2005
*************** namespace _GLIBCXX_STD
*** 290,307 ****
        //
        // We put this to the test in the constructors and in
        // get_allocator, where we use conversions between
!       // allocator_type and _Node_Alloc_type. The conversion is
        // required by table 32 in [20.1.5].
        typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
  
!       _Node_Alloc_type;
  
        struct _List_impl 
!       : public _Node_Alloc_type
        {
  	_List_node_base _M_node;
! 	_List_impl (const _Node_Alloc_type& __a)
! 	: _Node_Alloc_type(__a)
  	{ }
        };
  
--- 290,308 ----
        //
        // We put this to the test in the constructors and in
        // get_allocator, where we use conversions between
!       // allocator_type and _Node_alloc_type. The conversion is
        // required by table 32 in [20.1.5].
        typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
+         _Node_alloc_type;
  
!       typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
  
        struct _List_impl 
!       : public _Node_alloc_type
        {
  	_List_node_base _M_node;
! 	_List_impl(const _Node_alloc_type& __a)
! 	: _Node_alloc_type(__a)
  	{ }
        };
  
*************** namespace _GLIBCXX_STD
*** 309,327 ****
  
        _List_node<_Tp>*
        _M_get_node()
!       { return _M_impl._Node_Alloc_type::allocate(1); }
        
        void
        _M_put_node(_List_node<_Tp>* __p)
!       { _M_impl._Node_Alloc_type::deallocate(__p, 1); }
        
    public:
        typedef _Alloc allocator_type;
  
        allocator_type
        get_allocator() const
!       { return allocator_type(*static_cast<
! 			      const _Node_Alloc_type*>(&this->_M_impl)); }
  
        _List_base(const allocator_type& __a)
        : _M_impl(__a)
--- 310,331 ----
  
        _List_node<_Tp>*
        _M_get_node()
!       { return _M_impl._Node_alloc_type::allocate(1); }
        
        void
        _M_put_node(_List_node<_Tp>* __p)
!       { _M_impl._Node_alloc_type::deallocate(__p, 1); }
        
    public:
        typedef _Alloc allocator_type;
  
+       _Tp_alloc_type
+       _M_get_Tp_allocator() const
+       { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+ 
        allocator_type
        get_allocator() const
!       { return _M_get_Tp_allocator(); }
  
        _List_base(const allocator_type& __a)
        : _M_impl(__a)
*************** namespace _GLIBCXX_STD
*** 391,418 ****
      class list : protected _List_base<_Tp, _Alloc>
      {
        // concept requirements
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
  
!       typedef _List_base<_Tp, _Alloc>                   _Base;
  
      public:
        typedef _Tp                                        value_type;
!       typedef typename _Alloc::pointer                   pointer;
!       typedef typename _Alloc::const_pointer             const_pointer;
!       typedef typename _Alloc::reference                 reference;
!       typedef typename _Alloc::const_reference           const_reference;
        typedef _List_iterator<_Tp>                        iterator;
        typedef _List_const_iterator<_Tp>                  const_iterator;
        typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
        typedef std::reverse_iterator<iterator>            reverse_iterator;
        typedef size_t                                     size_type;
        typedef ptrdiff_t                                  difference_type;
!       typedef typename _Base::allocator_type             allocator_type;
  
      protected:
        // Note that pointers-to-_Node's can be ctor-converted to
        // iterator types.
!       typedef _List_node<_Tp>				_Node;
  
        /** @if maint
         *  One data member plus two memory-handling functions.  If the
--- 395,425 ----
      class list : protected _List_base<_Tp, _Alloc>
      {
        // concept requirements
+       typedef typename _Alloc::value_type                _Alloc_value_type;
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+       __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
  
!       typedef _List_base<_Tp, _Alloc>                    _Base;
!       typedef typename _Base::_Tp_alloc_type		 _Tp_alloc_type;
  
      public:
        typedef _Tp                                        value_type;
!       typedef typename _Tp_alloc_type::pointer           pointer;
!       typedef typename _Tp_alloc_type::const_pointer     const_pointer;
!       typedef typename _Tp_alloc_type::reference         reference;
!       typedef typename _Tp_alloc_type::const_reference   const_reference;
        typedef _List_iterator<_Tp>                        iterator;
        typedef _List_const_iterator<_Tp>                  const_iterator;
        typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
        typedef std::reverse_iterator<iterator>            reverse_iterator;
        typedef size_t                                     size_type;
        typedef ptrdiff_t                                  difference_type;
!       typedef _Alloc                                     allocator_type;
  
      protected:
        // Note that pointers-to-_Node's can be ctor-converted to
        // iterator types.
!       typedef _List_node<_Tp>				 _Node;
  
        /** @if maint
         *  One data member plus two memory-handling functions.  If the
*************** namespace _GLIBCXX_STD
*** 423,428 ****
--- 430,436 ----
        using _Base::_M_impl;
        using _Base::_M_put_node;
        using _Base::_M_get_node;
+       using _Base::_M_get_Tp_allocator;
  
        /**
         *  @if maint
*************** namespace _GLIBCXX_STD
*** 437,443 ****
  	_Node* __p = this->_M_get_node();
  	try
  	  {
! 	    this->get_allocator().construct(&__p->_M_data, __x);
  	  }
  	catch(...)
  	  {
--- 445,451 ----
  	_Node* __p = this->_M_get_node();
  	try
  	  {
! 	    _M_get_Tp_allocator().construct(&__p->_M_data, __x);
  	  }
  	catch(...)
  	  {
*************** namespace _GLIBCXX_STD
*** 1158,1164 ****
        {
          __position._M_node->unhook();
          _Node* __n = static_cast<_Node*>(__position._M_node);
!         this->get_allocator().destroy(&__n->_M_data);
          _M_put_node(__n);
        }
      };
--- 1166,1172 ----
        {
          __position._M_node->unhook();
          _Node* __n = static_cast<_Node*>(__position._M_node);
!         _M_get_Tp_allocator().destroy(&__n->_M_data);
          _M_put_node(__n);
        }
      };
diff -prN libstdc++-v3-orig/include/bits/stl_map.h libstdc++-v3/include/bits/stl_map.h
*** libstdc++-v3-orig/include/bits/stl_map.h	Tue May 10 03:58:17 2005
--- libstdc++-v3/include/bits/stl_map.h	Thu Jun  2 19:27:00 2005
*************** namespace _GLIBCXX_STD
*** 90,110 ****
              typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
      class map
      {
-       // concept requirements
-       __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
-       __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
- 				_BinaryFunctionConcept)
- 
      public:
        typedef _Key                                          key_type;
        typedef _Tp                                           mapped_type;
        typedef std::pair<const _Key, _Tp>                    value_type;
        typedef _Compare                                      key_compare;
  
        class value_compare
        : public std::binary_function<value_type, value_type, bool>
        {
! 	friend class map<_Key,_Tp,_Compare,_Alloc>;
        protected:
  	_Compare comp;
  
--- 90,115 ----
              typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
      class map
      {
      public:
        typedef _Key                                          key_type;
        typedef _Tp                                           mapped_type;
        typedef std::pair<const _Key, _Tp>                    value_type;
        typedef _Compare                                      key_compare;
+       typedef _Alloc                                        allocator_type;
+ 
+     private:
+       // concept requirements
+       typedef typename _Alloc::value_type                   _Alloc_value_type;
+       __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+       __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ 				_BinaryFunctionConcept)
+       __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
  
+     public:
        class value_compare
        : public std::binary_function<value_type, value_type, bool>
        {
! 	friend class map<_Key, _Tp, _Compare, _Alloc>;
        protected:
  	_Compare comp;
  
*************** namespace _GLIBCXX_STD
*** 118,136 ****
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]map.  @endif
!       typedef _Rb_tree<key_type, value_type,
! 		       _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
        // many of these are specified differently in ISO, but the following are
        // "functionally equivalent"
!       typedef typename _Alloc::pointer                   pointer;
!       typedef typename _Alloc::const_pointer             const_pointer;
!       typedef typename _Alloc::reference                 reference;
!       typedef typename _Alloc::const_reference           const_reference;
!       typedef typename _Rep_type::allocator_type         allocator_type;
        typedef typename _Rep_type::iterator               iterator;
        typedef typename _Rep_type::const_iterator         const_iterator;
        typedef typename _Rep_type::size_type              size_type;
--- 123,144 ----
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]map.  @endif
!       typedef typename _Alloc::template rebind<value_type>::other 
!         _Pair_alloc_type;
! 
!       typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
! 		       key_compare, _Pair_alloc_type> _Rep_type;
! 
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
        // many of these are specified differently in ISO, but the following are
        // "functionally equivalent"
!       typedef typename _Pair_alloc_type::pointer         pointer;
!       typedef typename _Pair_alloc_type::const_pointer   const_pointer;
!       typedef typename _Pair_alloc_type::reference       reference;
!       typedef typename _Pair_alloc_type::const_reference const_reference;
        typedef typename _Rep_type::iterator               iterator;
        typedef typename _Rep_type::const_iterator         const_iterator;
        typedef typename _Rep_type::size_type              size_type;
*************** namespace _GLIBCXX_STD
*** 589,595 ****
         *
         *  This function probably only makes sense for multimaps.
         */
!       std::pair<iterator,iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
--- 597,603 ----
         *
         *  This function probably only makes sense for multimaps.
         */
!       std::pair<iterator, iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
*************** namespace _GLIBCXX_STD
*** 608,626 ****
         *
         *  This function probably only makes sense for multimaps.
         */
!       std::pair<const_iterator,const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator== (const map<_K1,_T1,_C1,_A1>&,
! 		    const map<_K1,_T1,_C1,_A1>&);
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator< (const map<_K1,_T1,_C1,_A1>&,
! 		   const map<_K1,_T1,_C1,_A1>&);
      };
  
    /**
--- 616,634 ----
         *
         *  This function probably only makes sense for multimaps.
         */
!       std::pair<const_iterator, const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator== (const map<_K1, _T1, _C1, _A1>&,
! 		    const map<_K1, _T1, _C1, _A1>&);
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator< (const map<_K1, _T1, _C1, _A1>&,
! 		   const map<_K1, _T1, _C1, _A1>&);
      };
  
    /**
*************** namespace _GLIBCXX_STD
*** 635,642 ****
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!                const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
--- 643,650 ----
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!                const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
*************** namespace _GLIBCXX_STD
*** 652,693 ****
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!               const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    /// Based on operator==
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator!=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!                const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__x == __y); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!               const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __y < __x; }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!                const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__y < __x); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
!                const map<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::map::swap().
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline void
!     swap(map<_Key,_Tp,_Compare,_Alloc>& __x, map<_Key,_Tp,_Compare,_Alloc>& __y)
      { __x.swap(__y); }
  } // namespace std
  
--- 660,702 ----
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!               const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    /// Based on operator==
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!                const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__x == __y); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!               const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __y < __x; }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!                const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__y < __x); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
!                const map<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::map::swap().
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline void
!     swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
! 	 map<_Key, _Tp, _Compare, _Alloc>& __y)
      { __x.swap(__y); }
  } // namespace std
  
diff -prN libstdc++-v3-orig/include/bits/stl_multimap.h libstdc++-v3/include/bits/stl_multimap.h
*** libstdc++-v3-orig/include/bits/stl_multimap.h	Tue May 10 03:58:17 2005
--- libstdc++-v3/include/bits/stl_multimap.h	Thu Jun  2 19:32:52 2005
*************** namespace _GLIBCXX_STD
*** 74,86 ****
  
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
! 	       const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
  
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
! 	      const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
  
    /**
     *  @brief A standard container made up of (key,value) pairs, which can be
--- 74,86 ----
  
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
! 	       const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
  
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
! 	      const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
  
    /**
     *  @brief A standard container made up of (key,value) pairs, which can be
*************** namespace _GLIBCXX_STD
*** 106,126 ****
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      class multimap
      {
-       // concept requirements
-       __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
-       __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
- 				_BinaryFunctionConcept)
- 
      public:
        typedef _Key                                          key_type;
        typedef _Tp                                           mapped_type;
        typedef std::pair<const _Key, _Tp>                    value_type;
        typedef _Compare                                      key_compare;
  
        class value_compare
        : public std::binary_function<value_type, value_type, bool>
        {
! 	friend class multimap<_Key,_Tp,_Compare,_Alloc>;
        protected:
  	_Compare comp;
  
--- 106,131 ----
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      class multimap
      {
      public:
        typedef _Key                                          key_type;
        typedef _Tp                                           mapped_type;
        typedef std::pair<const _Key, _Tp>                    value_type;
        typedef _Compare                                      key_compare;
+       typedef _Alloc                                        allocator_type;
  
+     private:
+       // concept requirements
+       typedef typename _Alloc::value_type                   _Alloc_value_type;
+       __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+       __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ 				_BinaryFunctionConcept)
+       __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)	
+ 
+     public:
        class value_compare
        : public std::binary_function<value_type, value_type, bool>
        {
! 	friend class multimap<_Key, _Tp, _Compare, _Alloc>;
        protected:
  	_Compare comp;
  
*************** namespace _GLIBCXX_STD
*** 134,152 ****
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]map.  @endif
!       typedef _Rb_tree<key_type, value_type,
! 		       _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
        // many of these are specified differently in ISO, but the following are
        // "functionally equivalent"
!       typedef typename _Alloc::pointer                   pointer;
!       typedef typename _Alloc::const_pointer             const_pointer;
!       typedef typename _Alloc::reference                 reference;
!       typedef typename _Alloc::const_reference           const_reference;
!       typedef typename _Rep_type::allocator_type         allocator_type;
        typedef typename _Rep_type::iterator               iterator;
        typedef typename _Rep_type::const_iterator         const_iterator;
        typedef typename _Rep_type::size_type              size_type;
--- 139,159 ----
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]map.  @endif
!       typedef typename _Alloc::template rebind<value_type>::other 
!         _Pair_alloc_type;
! 
!       typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
! 		       key_compare, _Pair_alloc_type> _Rep_type;
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
        // many of these are specified differently in ISO, but the following are
        // "functionally equivalent"
!       typedef typename _Pair_alloc_type::pointer         pointer;
!       typedef typename _Pair_alloc_type::const_pointer   const_pointer;
!       typedef typename _Pair_alloc_type::reference       reference;
!       typedef typename _Pair_alloc_type::const_reference const_reference;
        typedef typename _Rep_type::iterator               iterator;
        typedef typename _Rep_type::const_iterator         const_iterator;
        typedef typename _Rep_type::size_type              size_type;
*************** namespace _GLIBCXX_STD
*** 573,579 ****
         *  @endcode
         *  (but is faster than making the calls separately).
         */
!       std::pair<iterator,iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
--- 580,586 ----
         *  @endcode
         *  (but is faster than making the calls separately).
         */
!       std::pair<iterator, iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
*************** namespace _GLIBCXX_STD
*** 590,608 ****
         *  @endcode
         *  (but is faster than making the calls separately).
         */
!       std::pair<const_iterator,const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator== (const multimap<_K1,_T1,_C1,_A1>&,
! 		    const multimap<_K1,_T1,_C1,_A1>&);
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator< (const multimap<_K1,_T1,_C1,_A1>&,
! 		   const multimap<_K1,_T1,_C1,_A1>&);
    };
  
    /**
--- 597,615 ----
         *  @endcode
         *  (but is faster than making the calls separately).
         */
!       std::pair<const_iterator, const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator== (const multimap<_K1, _T1, _C1, _A1>&,
! 		    const multimap<_K1, _T1, _C1, _A1>&);
  
        template <typename _K1, typename _T1, typename _C1, typename _A1>
          friend bool
!         operator< (const multimap<_K1, _T1, _C1, _A1>&,
! 		   const multimap<_K1, _T1, _C1, _A1>&);
    };
  
    /**
*************** namespace _GLIBCXX_STD
*** 617,624 ****
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!                const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
--- 624,631 ----
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!                const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
*************** namespace _GLIBCXX_STD
*** 634,676 ****
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!               const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    /// Based on operator==
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator!=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!                const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__x == __y); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!               const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return __y < __x; }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!                const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__y < __x); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!                const multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::multimap::swap().
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline void
!     swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x,
!          multimap<_Key,_Tp,_Compare,_Alloc>& __y)
      { __x.swap(__y); }
  } // namespace std
  
--- 641,683 ----
    */
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    /// Based on operator==
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!                const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__x == __y); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!               const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return __y < __x; }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!                const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__y < __x); }
  
    /// Based on operator<
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline bool
!     operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!                const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::multimap::swap().
    template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      inline void
!     swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
!          multimap<_Key, _Tp, _Compare, _Alloc>& __y)
      { __x.swap(__y); }
  } // namespace std
  
diff -prN libstdc++-v3-orig/include/bits/stl_multiset.h libstdc++-v3/include/bits/stl_multiset.h
*** libstdc++-v3-orig/include/bits/stl_multiset.h	Tue May 10 03:58:17 2005
--- libstdc++-v3/include/bits/stl_multiset.h	Thu Jun  2 19:25:32 2005
*************** namespace _GLIBCXX_STD
*** 73,85 ****
  
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const multiset<_Key,_Compare,_Alloc>& __x,
! 	       const multiset<_Key,_Compare,_Alloc>& __y);
  
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const multiset<_Key,_Compare,_Alloc>& __x,
! 	      const multiset<_Key,_Compare,_Alloc>& __y);
  
    /**
     *  @brief A standard container made up of elements, which can be retrieved
--- 73,85 ----
  
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const multiset<_Key, _Compare, _Alloc>& __x,
! 	       const multiset<_Key, _Compare, _Alloc>& __y);
  
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
! 	      const multiset<_Key, _Compare, _Alloc>& __y);
  
    /**
     *  @brief A standard container made up of elements, which can be retrieved
*************** namespace _GLIBCXX_STD
*** 105,113 ****
--- 105,115 ----
      class multiset
      {
        // concept requirements
+       typedef typename _Alloc::value_type                   _Alloc_value_type;
        __glibcxx_class_requires(_Key, _SGIAssignableConcept)
        __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
  				_BinaryFunctionConcept)
+       __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)	
  
      public:
        // typedefs:
*************** namespace _GLIBCXX_STD
*** 115,149 ****
        typedef _Key     value_type;
        typedef _Compare key_compare;
        typedef _Compare value_compare;
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]set.  @endif
!       typedef _Rb_tree<key_type, value_type,
! 		       _Identity<value_type>, key_compare, _Alloc> _Rep_type;
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
!       typedef typename _Alloc::pointer pointer;
!       typedef typename _Alloc::const_pointer const_pointer;
!       typedef typename _Alloc::reference reference;
!       typedef typename _Alloc::const_reference const_reference;
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // DR 103. set::iterator is required to be modifiable,
        // but this allows modification of keys.
!       typedef typename _Rep_type::const_iterator iterator;
!       typedef typename _Rep_type::const_iterator const_iterator;
!       typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
!       typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
!       typedef typename _Rep_type::size_type size_type;
!       typedef typename _Rep_type::difference_type difference_type;
!       typedef typename _Rep_type::allocator_type allocator_type;
! 
!     // allocation/deallocation
! 
!     /**
!      *  @brief  Default constructor creates no elements.
!      */
        multiset()
        : _M_t(_Compare(), allocator_type()) { }
  
--- 117,153 ----
        typedef _Key     value_type;
        typedef _Compare key_compare;
        typedef _Compare value_compare;
+       typedef _Alloc   allocator_type;
  
      private:
        /// @if maint  This turns a red-black tree into a [multi]set.  @endif
!       typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
! 
!       typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
! 		       key_compare, _Key_alloc_type> _Rep_type;
        /// @if maint  The actual tree structure.  @endif
        _Rep_type _M_t;
  
      public:
!       typedef typename _Key_alloc_type::pointer             pointer;
!       typedef typename _Key_alloc_type::const_pointer       const_pointer;
!       typedef typename _Key_alloc_type::reference           reference;
!       typedef typename _Key_alloc_type::const_reference     const_reference;
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // DR 103. set::iterator is required to be modifiable,
        // but this allows modification of keys.
!       typedef typename _Rep_type::const_iterator            iterator;
!       typedef typename _Rep_type::const_iterator            const_iterator;
!       typedef typename _Rep_type::const_reverse_iterator    reverse_iterator;
!       typedef typename _Rep_type::const_reverse_iterator    const_reverse_iterator;
!       typedef typename _Rep_type::size_type                 size_type;
!       typedef typename _Rep_type::difference_type           difference_type;
! 
!       // allocation/deallocation
! 
!       /**
!        *  @brief  Default constructor creates no elements.
!        */
        multiset()
        : _M_t(_Compare(), allocator_type()) { }
  
*************** namespace _GLIBCXX_STD
*** 286,292 ****
         *  std::swap(s1,s2) will feed to this function.
         */
        void
!       swap(multiset<_Key,_Compare,_Alloc>& __x)
        { _M_t.swap(__x._M_t); }
  
        // insert/erase
--- 290,296 ----
         *  std::swap(s1,s2) will feed to this function.
         */
        void
!       swap(multiset<_Key, _Compare, _Alloc>& __x)
        { _M_t.swap(__x._M_t); }
  
        // insert/erase
*************** namespace _GLIBCXX_STD
*** 492,514 ****
         *
         *  This function probably only makes sense for multisets.
         */
!       std::pair<iterator,iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
!       std::pair<const_iterator,const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <class _K1, class _C1, class _A1>
          friend bool
!         operator== (const multiset<_K1,_C1,_A1>&,
! 		    const multiset<_K1,_C1,_A1>&);
  
        template <class _K1, class _C1, class _A1>
          friend bool
!         operator< (const multiset<_K1,_C1,_A1>&,
! 		   const multiset<_K1,_C1,_A1>&);
      };
  
    /**
--- 496,518 ----
         *
         *  This function probably only makes sense for multisets.
         */
!       std::pair<iterator, iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
!       std::pair<const_iterator, const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
  
        template <class _K1, class _C1, class _A1>
          friend bool
!         operator== (const multiset<_K1, _C1, _A1>&,
! 		    const multiset<_K1, _C1, _A1>&);
  
        template <class _K1, class _C1, class _A1>
          friend bool
!         operator< (const multiset<_K1, _C1, _A1>&,
! 		   const multiset<_K1, _C1, _A1>&);
      };
  
    /**
*************** namespace _GLIBCXX_STD
*** 524,531 ****
    */
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const multiset<_Key,_Compare,_Alloc>& __x,
! 	       const multiset<_Key,_Compare,_Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
--- 528,535 ----
    */
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const multiset<_Key, _Compare, _Alloc>& __x,
! 	       const multiset<_Key, _Compare, _Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
*************** namespace _GLIBCXX_STD
*** 541,555 ****
    */
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const multiset<_Key,_Compare,_Alloc>& __x,
! 	      const multiset<_Key,_Compare,_Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    ///  Returns !(x == y).
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator!=(const multiset<_Key,_Compare,_Alloc>& __x,
! 	       const multiset<_Key,_Compare,_Alloc>& __y)
      { return !(__x == __y); }
  
    ///  Returns y < x.
--- 545,559 ----
    */
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
! 	      const multiset<_Key, _Compare, _Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    ///  Returns !(x == y).
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
! 	       const multiset<_Key, _Compare, _Alloc>& __y)
      { return !(__x == __y); }
  
    ///  Returns y < x.
*************** namespace _GLIBCXX_STD
*** 562,583 ****
    ///  Returns !(y < x)
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<=(const multiset<_Key,_Compare,_Alloc>& __x,
! 	       const multiset<_Key,_Compare,_Alloc>& __y)
      { return !(__y < __x); }
  
    ///  Returns !(x < y)
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>=(const multiset<_Key,_Compare,_Alloc>& __x,
! 	       const multiset<_Key,_Compare,_Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::multiset::swap().
    template <class _Key, class _Compare, class _Alloc>
      inline void
!     swap(multiset<_Key,_Compare,_Alloc>& __x,
! 	 multiset<_Key,_Compare,_Alloc>& __y)
      { __x.swap(__y); }
  
  } // namespace std
--- 566,587 ----
    ///  Returns !(y < x)
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<=(const multiset<_Key, _Compare, _Alloc>& __x,
! 	       const multiset<_Key, _Compare, _Alloc>& __y)
      { return !(__y < __x); }
  
    ///  Returns !(x < y)
    template <class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>=(const multiset<_Key, _Compare, _Alloc>& __x,
! 	       const multiset<_Key, _Compare, _Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::multiset::swap().
    template <class _Key, class _Compare, class _Alloc>
      inline void
!     swap(multiset<_Key, _Compare, _Alloc>& __x,
! 	 multiset<_Key, _Compare, _Alloc>& __y)
      { __x.swap(__y); }
  
  } // namespace std
diff -prN libstdc++-v3-orig/include/bits/stl_set.h libstdc++-v3/include/bits/stl_set.h
*** libstdc++-v3-orig/include/bits/stl_set.h	Tue May 10 03:58:18 2005
--- libstdc++-v3/include/bits/stl_set.h	Thu Jun  2 19:41:42 2005
*************** namespace _GLIBCXX_STD
*** 72,84 ****
  
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const set<_Key,_Compare,_Alloc>& __x,
! 	       const set<_Key,_Compare,_Alloc>& __y);
  
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const set<_Key,_Compare,_Alloc>& __x,
! 	      const set<_Key,_Compare,_Alloc>& __y);
  
    /**
     *  @brief A standard container made up of unique keys, which can be
--- 72,84 ----
  
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const set<_Key, _Compare, _Alloc>& __x,
! 	       const set<_Key, _Compare, _Alloc>& __y);
  
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const set<_Key, _Compare, _Alloc>& __x,
! 	      const set<_Key, _Compare, _Alloc>& __y);
  
    /**
     *  @brief A standard container made up of unique keys, which can be
*************** namespace _GLIBCXX_STD
*** 107,115 ****
--- 107,117 ----
      class set
      {
        // concept requirements
+       typedef typename _Alloc::value_type                   _Alloc_value_type;
        __glibcxx_class_requires(_Key, _SGIAssignableConcept)
        __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
  				_BinaryFunctionConcept)
+       __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)	
  
      public:
        // typedefs:
*************** namespace _GLIBCXX_STD
*** 119,147 ****
        typedef _Key     value_type;
        typedef _Compare key_compare;
        typedef _Compare value_compare;
        //@}
  
      private:
!       typedef _Rb_tree<key_type, value_type,
! 		       _Identity<value_type>, key_compare, _Alloc> _Rep_type;
        _Rep_type _M_t;  // red-black tree representing set
      public:
        //@{
        ///  Iterator-related typedefs.
!       typedef typename _Alloc::pointer pointer;
!       typedef typename _Alloc::const_pointer const_pointer;
!       typedef typename _Alloc::reference reference;
!       typedef typename _Alloc::const_reference const_reference;
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // DR 103. set::iterator is required to be modifiable,
        // but this allows modification of keys.
!       typedef typename _Rep_type::const_iterator iterator;
!       typedef typename _Rep_type::const_iterator const_iterator;
!       typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
!       typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
!       typedef typename _Rep_type::size_type size_type;
!       typedef typename _Rep_type::difference_type difference_type;
!       typedef typename _Rep_type::allocator_type allocator_type;
        //@}
  
        // allocation/deallocation
--- 121,152 ----
        typedef _Key     value_type;
        typedef _Compare key_compare;
        typedef _Compare value_compare;
+       typedef _Alloc   allocator_type;
        //@}
  
      private:
!       typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
! 
!       typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
! 		       key_compare, _Key_alloc_type> _Rep_type;
        _Rep_type _M_t;  // red-black tree representing set
+ 
      public:
        //@{
        ///  Iterator-related typedefs.
!       typedef typename _Key_alloc_type::pointer             pointer;
!       typedef typename _Key_alloc_type::const_pointer       const_pointer;
!       typedef typename _Key_alloc_type::reference           reference;
!       typedef typename _Key_alloc_type::const_reference     const_reference;
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // DR 103. set::iterator is required to be modifiable,
        // but this allows modification of keys.
!       typedef typename _Rep_type::const_iterator            iterator;
!       typedef typename _Rep_type::const_iterator            const_iterator;
!       typedef typename _Rep_type::const_reverse_iterator    reverse_iterator;
!       typedef typename _Rep_type::const_reverse_iterator    const_reverse_iterator;
!       typedef typename _Rep_type::size_type                 size_type;
!       typedef typename _Rep_type::difference_type           difference_type;
        //@}
  
        // allocation/deallocation
*************** namespace _GLIBCXX_STD
*** 155,162 ****
         *  @param  comp  Comparator to use.
         *  @param  a  Allocator to use.
         */
!       explicit set(const _Compare& __comp,
! 		   const allocator_type& __a = allocator_type())
        : _M_t(__comp, __a) {}
  
        /**
--- 160,168 ----
         *  @param  comp  Comparator to use.
         *  @param  a  Allocator to use.
         */
!       explicit
!       set(const _Compare& __comp,
! 	  const allocator_type& __a = allocator_type())
        : _M_t(__comp, __a) {}
  
        /**
*************** namespace _GLIBCXX_STD
*** 503,524 ****
         *
         *  This function probably only makes sense for multisets.
         */
!       std::pair<iterator,iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
!       std::pair<const_iterator,const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
        //@}
  
        template<class _K1, class _C1, class _A1>
          friend bool
!         operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
  
        template<class _K1, class _C1, class _A1>
          friend bool
!         operator< (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
      };
  
  
--- 509,530 ----
         *
         *  This function probably only makes sense for multisets.
         */
!       std::pair<iterator, iterator>
        equal_range(const key_type& __x)
        { return _M_t.equal_range(__x); }
  
!       std::pair<const_iterator, const_iterator>
        equal_range(const key_type& __x) const
        { return _M_t.equal_range(__x); }
        //@}
  
        template<class _K1, class _C1, class _A1>
          friend bool
!         operator== (const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
  
        template<class _K1, class _C1, class _A1>
          friend bool
!         operator< (const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
      };
  
  
*************** namespace _GLIBCXX_STD
*** 534,541 ****
    */
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const set<_Key,_Compare,_Alloc>& __x,
! 	       const set<_Key,_Compare,_Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
--- 540,547 ----
    */
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator==(const set<_Key, _Compare, _Alloc>& __x,
! 	       const set<_Key, _Compare, _Alloc>& __y)
      { return __x._M_t == __y._M_t; }
  
    /**
*************** namespace _GLIBCXX_STD
*** 551,592 ****
    */
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const set<_Key,_Compare,_Alloc>& __x,
! 	      const set<_Key,_Compare,_Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    ///  Returns !(x == y).
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator!=(const set<_Key,_Compare,_Alloc>& __x,
! 	       const set<_Key,_Compare,_Alloc>& __y)
      { return !(__x == __y); }
  
    ///  Returns y < x.
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>(const set<_Key,_Compare,_Alloc>& __x,
! 	      const set<_Key,_Compare,_Alloc>& __y)
      { return __y < __x; }
  
    ///  Returns !(y < x)
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<=(const set<_Key,_Compare,_Alloc>& __x,
! 	       const set<_Key,_Compare,_Alloc>& __y)
      { return !(__y < __x); }
  
    ///  Returns !(x < y)
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>=(const set<_Key,_Compare,_Alloc>& __x,
! 	       const set<_Key,_Compare,_Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::set::swap().
    template<class _Key, class _Compare, class _Alloc>
      inline void
!     swap(set<_Key,_Compare,_Alloc>& __x, set<_Key,_Compare,_Alloc>& __y)
      { __x.swap(__y); }
  
  } // namespace std
--- 557,598 ----
    */
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<(const set<_Key, _Compare, _Alloc>& __x,
! 	      const set<_Key, _Compare, _Alloc>& __y)
      { return __x._M_t < __y._M_t; }
  
    ///  Returns !(x == y).
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator!=(const set<_Key, _Compare, _Alloc>& __x,
! 	       const set<_Key, _Compare, _Alloc>& __y)
      { return !(__x == __y); }
  
    ///  Returns y < x.
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>(const set<_Key, _Compare, _Alloc>& __x,
! 	      const set<_Key, _Compare, _Alloc>& __y)
      { return __y < __x; }
  
    ///  Returns !(y < x)
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator<=(const set<_Key, _Compare, _Alloc>& __x,
! 	       const set<_Key, _Compare, _Alloc>& __y)
      { return !(__y < __x); }
  
    ///  Returns !(x < y)
    template<class _Key, class _Compare, class _Alloc>
      inline bool
!     operator>=(const set<_Key, _Compare, _Alloc>& __x,
! 	       const set<_Key, _Compare, _Alloc>& __y)
      { return !(__x < __y); }
  
    /// See std::set::swap().
    template<class _Key, class _Compare, class _Alloc>
      inline void
!     swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
      { __x.swap(__y); }
  
  } // namespace std
diff -prN libstdc++-v3-orig/include/bits/stl_vector.h libstdc++-v3/include/bits/stl_vector.h
*** libstdc++-v3-orig/include/bits/stl_vector.h	Tue May 10 03:58:18 2005
--- libstdc++-v3/include/bits/stl_vector.h	Thu Jun  2 19:57:46 2005
*************** namespace _GLIBCXX_STD
*** 75,97 ****
    template<typename _Tp, typename _Alloc>
      struct _Vector_base
      {
        struct _Vector_impl 
!       : public _Alloc
        {
  	_Tp*           _M_start;
  	_Tp*           _M_finish;
  	_Tp*           _M_end_of_storage;
! 	_Vector_impl(_Alloc const& __a)
! 	: _Alloc(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
  	{ }
        };
        
      public:
        typedef _Alloc allocator_type;
  
        allocator_type
        get_allocator() const
!       { return *static_cast<const _Alloc*>(&this->_M_impl); }
  
        _Vector_base(const allocator_type& __a)
        : _M_impl(__a)
--- 75,103 ----
    template<typename _Tp, typename _Alloc>
      struct _Vector_base
      {
+       typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+ 
        struct _Vector_impl 
!       : public _Tp_alloc_type
        {
  	_Tp*           _M_start;
  	_Tp*           _M_finish;
  	_Tp*           _M_end_of_storage;
! 	_Vector_impl(_Tp_alloc_type const& __a)
! 	: _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
  	{ }
        };
        
      public:
        typedef _Alloc allocator_type;
  
+       _Tp_alloc_type
+       _M_get_Tp_allocator() const
+       { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+ 
        allocator_type
        get_allocator() const
!       { return _M_get_Tp_allocator(); }
  
        _Vector_base(const allocator_type& __a)
        : _M_impl(__a)
*************** namespace _GLIBCXX_STD
*** 148,164 ****
      class vector : protected _Vector_base<_Tp, _Alloc>
      {
        // Concept requirements.
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
! 
!       typedef _Vector_base<_Tp, _Alloc>			_Base;
!       typedef vector<_Tp, _Alloc>			vector_type;
  
      public:
        typedef _Tp					 value_type;
!       typedef typename _Alloc::pointer                   pointer;
!       typedef typename _Alloc::const_pointer             const_pointer;
!       typedef typename _Alloc::reference                 reference;
!       typedef typename _Alloc::const_reference           const_reference;
        typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator;
        typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
        const_iterator;
--- 154,173 ----
      class vector : protected _Vector_base<_Tp, _Alloc>
      {
        // Concept requirements.
+       typedef typename _Alloc::value_type                _Alloc_value_type;
        __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
!       __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
!       
!       typedef _Vector_base<_Tp, _Alloc>			 _Base;
!       typedef vector<_Tp, _Alloc>			 vector_type;
!       typedef typename _Base::_Tp_alloc_type		 _Tp_alloc_type;
  
      public:
        typedef _Tp					 value_type;
!       typedef typename _Tp_alloc_type::pointer           pointer;
!       typedef typename _Tp_alloc_type::const_pointer     const_pointer;
!       typedef typename _Tp_alloc_type::reference         reference;
!       typedef typename _Tp_alloc_type::const_reference   const_reference;
        typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator;
        typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
        const_iterator;
*************** namespace _GLIBCXX_STD
*** 166,172 ****
        typedef std::reverse_iterator<iterator>		 reverse_iterator;
        typedef size_t					 size_type;
        typedef ptrdiff_t					 difference_type;
!       typedef typename _Base::allocator_type		 allocator_type;
  
      protected:
        /** @if maint
--- 175,181 ----
        typedef std::reverse_iterator<iterator>		 reverse_iterator;
        typedef size_t					 size_type;
        typedef ptrdiff_t					 difference_type;
!       typedef _Alloc                        		 allocator_type;
  
      protected:
        /** @if maint
*************** namespace _GLIBCXX_STD
*** 177,182 ****
--- 186,192 ----
        using _Base::_M_allocate;
        using _Base::_M_deallocate;
        using _Base::_M_impl;
+       using _Base::_M_get_Tp_allocator;
  
      public:
        // [23.2.4.1] construct/copy/destroy
*************** namespace _GLIBCXX_STD
*** 201,207 ****
        : _Base(__n, __a)
        {
  	std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
! 				      this->get_allocator());
  	this->_M_impl._M_finish = this->_M_impl._M_start + __n;
        }
  
--- 211,217 ----
        : _Base(__n, __a)
        {
  	std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
! 				      _M_get_Tp_allocator());
  	this->_M_impl._M_finish = this->_M_impl._M_start + __n;
        }
  
*************** namespace _GLIBCXX_STD
*** 217,223 ****
        : _Base(__n, allocator_type())
        {
  	std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, value_type(),
! 				      this->get_allocator());
  	this->_M_impl._M_finish = this->_M_impl._M_start + __n;	
        }
  
--- 227,233 ----
        : _Base(__n, allocator_type())
        {
  	std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, value_type(),
! 				      _M_get_Tp_allocator());
  	this->_M_impl._M_finish = this->_M_impl._M_start + __n;	
        }
  
*************** namespace _GLIBCXX_STD
*** 235,241 ****
        { this->_M_impl._M_finish =
  	  std::__uninitialized_copy_a(__x.begin(), __x.end(),
  				      this->_M_impl._M_start,
! 				      this->get_allocator());
        }
  
        /**
--- 245,251 ----
        { this->_M_impl._M_finish =
  	  std::__uninitialized_copy_a(__x.begin(), __x.end(),
  				      this->_M_impl._M_start,
! 				      _M_get_Tp_allocator());
        }
  
        /**
*************** namespace _GLIBCXX_STD
*** 271,277 ****
         */
        ~vector()
        { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 		      this->get_allocator());
        }
  
        /**
--- 281,287 ----
         */
        ~vector()
        { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 		      _M_get_Tp_allocator());
        }
  
        /**
*************** namespace _GLIBCXX_STD
*** 764,770 ****
  	  try
  	    {
  	      std::__uninitialized_copy_a(__first, __last, __result,
! 					  this->get_allocator());
  	      return __result;
  	    }
  	  catch(...)
--- 774,780 ----
  	  try
  	    {
  	      std::__uninitialized_copy_a(__first, __last, __result,
! 					  _M_get_Tp_allocator());
  	      return __result;
  	    }
  	  catch(...)
*************** namespace _GLIBCXX_STD
*** 785,791 ****
  	  this->_M_impl._M_start = _M_allocate(__n);
  	  this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
  	  std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
! 					this->get_allocator());
  	  this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
  	}
  
--- 795,801 ----
  	  this->_M_impl._M_start = _M_allocate(__n);
  	  this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
  	  std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
! 					_M_get_Tp_allocator());
  	  this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
  	}
  
*************** namespace _GLIBCXX_STD
*** 822,828 ****
  	  this->_M_impl._M_finish =
  	    std::__uninitialized_copy_a(__first, __last,
  					this->_M_impl._M_start,
! 					this->get_allocator());
  	}
  
  
--- 832,838 ----
  	  this->_M_impl._M_finish =
  	    std::__uninitialized_copy_a(__first, __last,
  					this->_M_impl._M_start,
! 					_M_get_Tp_allocator());
  	}
  
  
diff -prN libstdc++-v3-orig/include/bits/vector.tcc libstdc++-v3/include/bits/vector.tcc
*** libstdc++-v3-orig/include/bits/vector.tcc	Tue May 10 03:58:19 2005
--- libstdc++-v3/include/bits/vector.tcc	Thu Jun  2 12:23:50 2005
*************** namespace _GLIBCXX_STD
*** 77,83 ****
  					       this->_M_impl._M_start,
  					       this->_M_impl._M_finish);
  	  std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			this->get_allocator());
  	  _M_deallocate(this->_M_impl._M_start,
  			this->_M_impl._M_end_of_storage
  			- this->_M_impl._M_start);
--- 77,83 ----
  					       this->_M_impl._M_start,
  					       this->_M_impl._M_finish);
  	  std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			_M_get_Tp_allocator());
  	  _M_deallocate(this->_M_impl._M_start,
  			this->_M_impl._M_end_of_storage
  			- this->_M_impl._M_start);
*************** namespace _GLIBCXX_STD
*** 122,128 ****
      erase(iterator __first, iterator __last)
      {
        iterator __i(std::copy(__last, end(), __first));
!       std::_Destroy(__i, end(), this->get_allocator());
        this->_M_impl._M_finish = this->_M_impl._M_finish - (__last - __first);
        return __first;
      }
--- 122,128 ----
      erase(iterator __first, iterator __last)
      {
        iterator __i(std::copy(__last, end(), __first));
!       std::_Destroy(__i, end(), _M_get_Tp_allocator());
        this->_M_impl._M_finish = this->_M_impl._M_finish - (__last - __first);
        return __first;
      }
*************** namespace _GLIBCXX_STD
*** 140,146 ****
  	      pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
  						   __x.end());
  	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			    this->get_allocator());
  	      _M_deallocate(this->_M_impl._M_start,
  			    this->_M_impl._M_end_of_storage
  			    - this->_M_impl._M_start);
--- 140,146 ----
  	      pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
  						   __x.end());
  	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			    _M_get_Tp_allocator());
  	      _M_deallocate(this->_M_impl._M_start,
  			    this->_M_impl._M_end_of_storage
  			    - this->_M_impl._M_start);
*************** namespace _GLIBCXX_STD
*** 150,156 ****
  	  else if (size() >= __xlen)
  	    {
  	      iterator __i(std::copy(__x.begin(), __x.end(), begin()));
! 	      std::_Destroy(__i, end(), this->get_allocator());
  	    }
  	  else
  	    {
--- 150,156 ----
  	  else if (size() >= __xlen)
  	    {
  	      iterator __i(std::copy(__x.begin(), __x.end(), begin()));
! 	      std::_Destroy(__i, end(), _M_get_Tp_allocator());
  	    }
  	  else
  	    {
*************** namespace _GLIBCXX_STD
*** 158,164 ****
  			this->_M_impl._M_start);
  	      std::__uninitialized_copy_a(__x.begin() + size(),
  					  __x.end(), this->_M_impl._M_finish,
! 					  this->get_allocator());
  	    }
  	  this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
  	}
--- 158,164 ----
  			this->_M_impl._M_start);
  	      std::__uninitialized_copy_a(__x.begin() + size(),
  					  __x.end(), this->_M_impl._M_finish,
! 					  _M_get_Tp_allocator());
  	    }
  	  this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
  	}
*************** namespace _GLIBCXX_STD
*** 172,178 ****
      {
        if (__n > capacity())
  	{
! 	  vector __tmp(__n, __val, get_allocator());
  	  __tmp.swap(*this);
  	}
        else if (__n > size())
--- 172,178 ----
      {
        if (__n > capacity())
  	{
! 	  vector __tmp(__n, __val, _M_get_Tp_allocator());
  	  __tmp.swap(*this);
  	}
        else if (__n > size())
*************** namespace _GLIBCXX_STD
*** 180,186 ****
  	  std::fill(begin(), end(), __val);
  	  std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
  					__n - size(), __val,
! 					this->get_allocator());
  	  this->_M_impl._M_finish += __n - size();
  	}
        else
--- 180,186 ----
  	  std::fill(begin(), end(), __val);
  	  std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
  					__n - size(), __val,
! 					_M_get_Tp_allocator());
  	  this->_M_impl._M_finish += __n - size();
  	}
        else
*************** namespace _GLIBCXX_STD
*** 216,222 ****
  	  {
  	    pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
  	    std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			  this->get_allocator());
  	    _M_deallocate(this->_M_impl._M_start,
  			  this->_M_impl._M_end_of_storage
  			  - this->_M_impl._M_start);
--- 216,222 ----
  	  {
  	    pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
  	    std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			  _M_get_Tp_allocator());
  	    _M_deallocate(this->_M_impl._M_start,
  			  this->_M_impl._M_end_of_storage
  			  - this->_M_impl._M_start);
*************** namespace _GLIBCXX_STD
*** 228,234 ****
  	  {
  	    iterator __new_finish(std::copy(__first, __last,
  				       this->_M_impl._M_start));
! 	    std::_Destroy(__new_finish, end(), this->get_allocator());
  	    this->_M_impl._M_finish = __new_finish.base();
  	  }
  	else
--- 228,234 ----
  	  {
  	    iterator __new_finish(std::copy(__first, __last,
  				       this->_M_impl._M_start));
! 	    std::_Destroy(__new_finish, end(), _M_get_Tp_allocator());
  	    this->_M_impl._M_finish = __new_finish.base();
  	  }
  	else
*************** namespace _GLIBCXX_STD
*** 239,245 ****
  	    this->_M_impl._M_finish =
  	      std::__uninitialized_copy_a(__mid, __last,
  					  this->_M_impl._M_finish,
! 					  this->get_allocator());
  	  }
        }
  
--- 239,245 ----
  	    this->_M_impl._M_finish =
  	      std::__uninitialized_copy_a(__mid, __last,
  					  this->_M_impl._M_finish,
! 					  _M_get_Tp_allocator());
  	  }
        }
  
*************** namespace _GLIBCXX_STD
*** 280,301 ****
  		std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
  					    __position,
  					    __new_start,
! 					    this->get_allocator());
  	      this->_M_impl.construct(__new_finish.base(), __x);
  	      ++__new_finish;
  	      __new_finish =
  		std::__uninitialized_copy_a(__position,
  					    iterator(this->_M_impl._M_finish),
  					    __new_finish,
! 					    this->get_allocator());
  	    }
  	  catch(...)
  	    {
! 	      std::_Destroy(__new_start, __new_finish, this->get_allocator());
  	      _M_deallocate(__new_start.base(),__len);
  	      __throw_exception_again;
  	    }
! 	  std::_Destroy(begin(), end(), this->get_allocator());
  	  _M_deallocate(this->_M_impl._M_start,
  			this->_M_impl._M_end_of_storage
  			- this->_M_impl._M_start);
--- 280,301 ----
  		std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
  					    __position,
  					    __new_start,
! 					    _M_get_Tp_allocator());
  	      this->_M_impl.construct(__new_finish.base(), __x);
  	      ++__new_finish;
  	      __new_finish =
  		std::__uninitialized_copy_a(__position,
  					    iterator(this->_M_impl._M_finish),
  					    __new_finish,
! 					    _M_get_Tp_allocator());
  	    }
  	  catch(...)
  	    {
! 	      std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
  	      _M_deallocate(__new_start.base(),__len);
  	      __throw_exception_again;
  	    }
! 	  std::_Destroy(begin(), end(), _M_get_Tp_allocator());
  	  _M_deallocate(this->_M_impl._M_start,
  			this->_M_impl._M_end_of_storage
  			- this->_M_impl._M_start);
*************** namespace _GLIBCXX_STD
*** 323,329 ****
  		  std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      this->get_allocator());
  		  this->_M_impl._M_finish += __n;
  		  std::copy_backward(__position, __old_finish - __n,
  				     __old_finish);
--- 323,329 ----
  		  std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
  					      this->_M_impl._M_finish,
  					      this->_M_impl._M_finish,
! 					      _M_get_Tp_allocator());
  		  this->_M_impl._M_finish += __n;
  		  std::copy_backward(__position, __old_finish - __n,
  				     __old_finish);
*************** namespace _GLIBCXX_STD
*** 334,344 ****
  		  std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
  						__n - __elems_after,
  						__x_copy,
! 						this->get_allocator());
  		  this->_M_impl._M_finish += __n - __elems_after;
  		  std::__uninitialized_copy_a(__position, __old_finish,
  					      this->_M_impl._M_finish,
! 					      this->get_allocator());
  		  this->_M_impl._M_finish += __elems_after;
  		  std::fill(__position, __old_finish, __x_copy);
  		}
--- 334,344 ----
  		  std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
  						__n - __elems_after,
  						__x_copy,
! 						_M_get_Tp_allocator());
  		  this->_M_impl._M_finish += __n - __elems_after;
  		  std::__uninitialized_copy_a(__position, __old_finish,
  					      this->_M_impl._M_finish,
! 					      _M_get_Tp_allocator());
  		  this->_M_impl._M_finish += __elems_after;
  		  std::fill(__position, __old_finish, __x_copy);
  		}
*************** namespace _GLIBCXX_STD
*** 361,383 ****
  		  __new_finish =
  		    std::__uninitialized_copy_a(begin(), __position,
  						__new_start,
! 						this->get_allocator());
  		  std::__uninitialized_fill_n_a(__new_finish, __n, __x,
! 						this->get_allocator());
  		  __new_finish += __n;
  		  __new_finish =
  		    std::__uninitialized_copy_a(__position, end(), __new_finish,
! 						this->get_allocator());
  		}
  	      catch(...)
  		{
  		  std::_Destroy(__new_start, __new_finish,
! 				this->get_allocator());
  		  _M_deallocate(__new_start.base(), __len);
  		  __throw_exception_again;
  		}
  	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			    this->get_allocator());
  	      _M_deallocate(this->_M_impl._M_start,
  			    this->_M_impl._M_end_of_storage
  			    - this->_M_impl._M_start);
--- 361,383 ----
  		  __new_finish =
  		    std::__uninitialized_copy_a(begin(), __position,
  						__new_start,
! 						_M_get_Tp_allocator());
  		  std::__uninitialized_fill_n_a(__new_finish, __n, __x,
! 						_M_get_Tp_allocator());
  		  __new_finish += __n;
  		  __new_finish =
  		    std::__uninitialized_copy_a(__position, end(), __new_finish,
! 						_M_get_Tp_allocator());
  		}
  	      catch(...)
  		{
  		  std::_Destroy(__new_start, __new_finish,
! 				_M_get_Tp_allocator());
  		  _M_deallocate(__new_start.base(), __len);
  		  __throw_exception_again;
  		}
  	      std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			    _M_get_Tp_allocator());
  	      _M_deallocate(this->_M_impl._M_start,
  			    this->_M_impl._M_end_of_storage
  			    - this->_M_impl._M_start);
*************** namespace _GLIBCXX_STD
*** 421,427 ****
  		    std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
  						this->_M_impl._M_finish,
  						this->_M_impl._M_finish,
! 						this->get_allocator());
  		    this->_M_impl._M_finish += __n;
  		    std::copy_backward(__position, __old_finish - __n,
  				       __old_finish);
--- 421,427 ----
  		    std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
  						this->_M_impl._M_finish,
  						this->_M_impl._M_finish,
! 						_M_get_Tp_allocator());
  		    this->_M_impl._M_finish += __n;
  		    std::copy_backward(__position, __old_finish - __n,
  				       __old_finish);
*************** namespace _GLIBCXX_STD
*** 433,443 ****
  		    std::advance(__mid, __elems_after);
  		    std::__uninitialized_copy_a(__mid, __last,
  						this->_M_impl._M_finish,
! 						this->get_allocator());
  		    this->_M_impl._M_finish += __n - __elems_after;
  		    std::__uninitialized_copy_a(__position, __old_finish,
  						this->_M_impl._M_finish,
! 						this->get_allocator());
  		    this->_M_impl._M_finish += __elems_after;
  		    std::copy(__first, __mid, __position);
  		  }
--- 433,443 ----
  		    std::advance(__mid, __elems_after);
  		    std::__uninitialized_copy_a(__mid, __last,
  						this->_M_impl._M_finish,
! 						_M_get_Tp_allocator());
  		    this->_M_impl._M_finish += __n - __elems_after;
  		    std::__uninitialized_copy_a(__position, __old_finish,
  						this->_M_impl._M_finish,
! 						_M_get_Tp_allocator());
  		    this->_M_impl._M_finish += __elems_after;
  		    std::copy(__first, __mid, __position);
  		  }
*************** namespace _GLIBCXX_STD
*** 461,485 ****
  		      std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
  						  __position,
  						  __new_start,
! 						  this->get_allocator());
  		    __new_finish =
  		      std::__uninitialized_copy_a(__first, __last, __new_finish,
! 						  this->get_allocator());
  		    __new_finish =
  		      std::__uninitialized_copy_a(__position,
  						  iterator(this->_M_impl._M_finish),
  						  __new_finish,
! 						  this->get_allocator());
  		  }
  		catch(...)
  		  {
  		    std::_Destroy(__new_start,__new_finish,
! 				  this->get_allocator());
  		    _M_deallocate(__new_start.base(), __len);
  		    __throw_exception_again;
  		  }
  		std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			      this->get_allocator());
  		_M_deallocate(this->_M_impl._M_start,
  			      this->_M_impl._M_end_of_storage
  			      - this->_M_impl._M_start);
--- 461,485 ----
  		      std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
  						  __position,
  						  __new_start,
! 						  _M_get_Tp_allocator());
  		    __new_finish =
  		      std::__uninitialized_copy_a(__first, __last, __new_finish,
! 						  _M_get_Tp_allocator());
  		    __new_finish =
  		      std::__uninitialized_copy_a(__position,
  						  iterator(this->_M_impl._M_finish),
  						  __new_finish,
! 						  _M_get_Tp_allocator());
  		  }
  		catch(...)
  		  {
  		    std::_Destroy(__new_start,__new_finish,
! 				  _M_get_Tp_allocator());
  		    _M_deallocate(__new_start.base(), __len);
  		    __throw_exception_again;
  		  }
  		std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
! 			      _M_get_Tp_allocator());
  		_M_deallocate(this->_M_impl._M_start,
  			      this->_M_impl._M_end_of_storage
  			      - this->_M_impl._M_start);
diff -prN libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation/1.cc libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/1.cc
*** libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation/1.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/1.cc	Mon Aug  2 06:40:16 2004
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2004 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <deque>
+ 
+ // { dg-do compile }
+ 
+ template class std::deque<int>;
diff -prN libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation/3.cc libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/3.cc
*** libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation/3.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/3.cc	Thu Jun  2 17:37:48 2005
***************
*** 0 ****
--- 1,35 ----
+ // Copyright (C) 2005 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <deque>
+ 
+ // { dg-do compile }
+ 
+ // libstdc++/21770
+ template class std::deque<int, std::allocator<char> >;
diff -prN libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation.cc libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation.cc
*** libstdc++-v3-orig/testsuite/23_containers/deque/explicit_instantiation.cc	Mon Aug  2 06:40:16 2004
--- libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation.cc	Thu Jan  1 01:00:00 1970
***************
*** 1,34 ****
- // Copyright (C) 2004 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.
- 
- // This file tests explicit instantiation of library containers
- 
- #include <deque>
- 
- // { dg-do compile }
- 
- template class std::deque<int>;
--- 0 ----
diff -prN libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation/1.cc libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/1.cc
*** libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation/1.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/1.cc	Mon Aug  2 06:40:16 2004
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2004 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <list>
+ 
+ // { dg-do compile }
+ 
+ template class std::list<int>;
diff -prN libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation/3.cc libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/3.cc
*** libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation/3.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/3.cc	Thu Jun  2 13:43:08 2005
***************
*** 0 ****
--- 1,35 ----
+ // Copyright (C) 2005 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <list>
+ 
+ // { dg-do compile }
+ 
+ // libstdc++/21770
+ template class std::list<int, std::allocator<char> >;
diff -prN libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation.cc libstdc++-v3/testsuite/23_containers/list/explicit_instantiation.cc
*** libstdc++-v3-orig/testsuite/23_containers/list/explicit_instantiation.cc	Mon Aug  2 06:40:16 2004
--- libstdc++-v3/testsuite/23_containers/list/explicit_instantiation.cc	Thu Jan  1 01:00:00 1970
***************
*** 1,34 ****
- // Copyright (C) 2004 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.
- 
- // This file tests explicit instantiation of library containers
- 
- #include <list>
- 
- // { dg-do compile }
- 
- template class std::list<int>;
--- 0 ----
diff -prN libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation/1.cc libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/1.cc
*** libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation/1.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/1.cc	Mon Aug  2 06:40:17 2004
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2004 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <map>
+ 
+ // { dg-do compile }
+ 
+ template class std::map<int, double>;
diff -prN libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation/3.cc libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/3.cc
*** libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation/3.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/3.cc	Thu Jun  2 18:22:53 2005
***************
*** 0 ****
--- 1,35 ----
+ // Copyright (C) 2005 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <map>
+ 
+ // { dg-do compile }
+ 
+ // libstdc++/21770
+ template class std::map<int, double, std::less<int>, std::allocator<char> >;
diff -prN libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation.cc libstdc++-v3/testsuite/23_containers/map/explicit_instantiation.cc
*** libstdc++-v3-orig/testsuite/23_containers/map/explicit_instantiation.cc	Mon Aug  2 06:40:17 2004
--- libstdc++-v3/testsuite/23_containers/map/explicit_instantiation.cc	Thu Jan  1 01:00:00 1970
***************
*** 1,34 ****
- // Copyright (C) 2004 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.
- 
- // This file tests explicit instantiation of library containers
- 
- #include <map>
- 
- // { dg-do compile }
- 
- template class std::map<int, double>;
--- 0 ----
diff -prN libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation/1.cc libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/1.cc
*** libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation/1.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/1.cc	Mon Aug  2 06:40:17 2004
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2004 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <map>
+ 
+ // { dg-do compile }
+ 
+ template class std::multimap<int, double>;
diff -prN libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation/3.cc libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/3.cc
*** libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation/3.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/3.cc	Thu Jun  2 18:24:11 2005
***************
*** 0 ****
--- 1,35 ----
+ // Copyright (C) 2005 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <map>
+ 
+ // { dg-do compile }
+ 
+ // libstdc++/21770
+ template class std::multimap<int, double, std::less<int>, std::allocator<char> >;
diff -prN libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation.cc libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation.cc
*** libstdc++-v3-orig/testsuite/23_containers/multimap/explicit_instantiation.cc	Mon Aug  2 06:40:17 2004
--- libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation.cc	Thu Jan  1 01:00:00 1970
***************
*** 1,34 ****
- // Copyright (C) 2004 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.
- 
- // This file tests explicit instantiation of library containers
- 
- #include <map>
- 
- // { dg-do compile }
- 
- template class std::multimap<int, double>;
--- 0 ----
diff -prN libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation/1.cc libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/1.cc
*** libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation/1.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/1.cc	Mon Aug  2 06:40:18 2004
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2004 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <set>
+ 
+ // { dg-do compile }
+ 
+ template class std::multiset<int>;
diff -prN libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation/3.cc libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/3.cc
*** libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation/3.cc	Thu Jan  1 01:00:00 1970
--- libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/3.cc	Thu Jun  2 19:18:47 2005
***************
*** 0 ****
--- 1,35 ----
+ // Copyright (C) 2005 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.
+ 
+ // This file tests explicit instantiation of library containers
+ 
+ #include <set>
+ 
+ // { dg-do compile }
+ 
+ // libstdc++/21770
+ template class std::multiset<int, std::less<int>, std::allocator<char> >;
diff -prN libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation.cc libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation.cc
*** libstdc++-v3-orig/testsuite/23_containers/multiset/explicit_instantiation.cc	Mon Aug  2 06:40:18 2004
--- libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation.cc	Thu Jan  1 01:00:00 1970
***************
*** 1,34 ****
- // Copyright (C) 2004 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.
- 
- // This file tests explicit instantiation of library containers
- 
- #include <set>
- 
- // { dg-do compile }
- 
- template class