This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Re: default allocator templ arg for map and multimap



>The __STL_DEFAULT_ALLOCATOR macro is an obsolete compabitility
>hack.  Please do submit a patch without it, and without the
>__STL_LIMITED_DEFAULT_TEMPLATES hack either.

Ok, i'm appending a patch that does that.

>(For extra credit, eliminate both from all declarations -- but don't
>hold up the fix on that account.)

Following that is a patch that removes all instances of those macros
(plus __STL_DEPENDENT_DEFAULT_TMPL) that i could find from the library.

[Aside: I also noticed that the hash_map and hash_multimap have the
same problem with the allocator default that map and multimap did...]

sss


2000-04-10  scott snyder  <snyder@fnal.gov>

	* stl/bits/stl_map.h (class map): Fix default for _Alloc template
	parameter.  Get rid of use of __STL_DEFAULT_ALLOCATOR and
	__STL_LIMITED_DEFAULT_TEMPLATES macros.
	* stl/bits/stl_multimap.h (class multimap): Likewise.  Get rid of
	use of __STL_DEPENDENT_DEFAULT_TMPL macro.

Index: stl/bits/stl_map.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_map.h,v
retrieving revision 1.7
diff -u -p -r1.7 stl_map.h
--- stl_map.h	1999/05/05 00:39:22	1.7
+++ stl_map.h	2000/04/11 04:28:02
@@ -38,13 +38,8 @@ __STL_BEGIN_NAMESPACE
 #pragma set woff 1375
 #endif
 
-#ifndef __STL_LIMITED_DEFAULT_TEMPLATES
 template <class _Key, class _Tp, class _Compare = less<_Key>,
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
-#else
-template <class _Key, class _Tp, class _Compare,
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
-#endif
+          class _Alloc = allocator<pair<const _Key, const _Tp> > >
 class map {
 public:
 
Index: stl/bits/stl_multimap.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_multimap.h,v
retrieving revision 1.8
diff -u -p -r1.8 stl_multimap.h
--- stl_multimap.h	1999/05/05 00:39:23	1.8
+++ stl_multimap.h	2000/04/11 04:28:02
@@ -41,8 +41,8 @@ __STL_BEGIN_NAMESPACE
 // Forward declaration of operators < and ==, needed for friend declaration.
 
 template <class _Key, class _Tp, 
-          class _Compare __STL_DEPENDENT_DEFAULT_TMPL(less<_Key>),
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
+          class _Compare = less<_Key>,
+          class _Alloc = allocator<pair<const _Key, const _Tp> > >
 class multimap;
 
 template <class _Key, class _Tp, class _Compare, class _Alloc>




2000-04-10  scott snyder  <snyder@fnal.gov>

	* stl/bits/stl_config.h (__STL_DEPENDENT_DEFAULT_TMPL): Deleted
	this macro.

	* stl/ext/hash_map (class hash_map, class hash_multimap): Get rid
	of use of __STL_DEPENDENT_DEFAULT_TMPL macro.
	* stl/ext/hash_set (class hash_set, class hash_multiset):
	Likewise.
	* stl/bits/stl_function.h (struct constant_unary_fun, struct
	constant_binary_fun): Likewise.
	* stl/bits/stl_queue.h (class queue, class priority_queue): Likewise.
	* stl/bits/stl_stack.h (class stack): Likewise.
	* stl/bits/stl_set.h (class set): Likewise.
	* stl/bits/stl_multiset.h (class multiset): Likewise.

	* stl/bits/stl_iterator.h (class reverse_bidirectional_iterator,
	class reverse_iterator): Get rid of use of
	__STL_LIMITED_DEFAULT_TEMPLATES macro.

	* stl/bits/stl_config.h (__STL_DEFAULT_ALLOCATOR): Deleted this
	macro.

	* stl/bits/stl_deque.h (class deque): Get rid of use of
	__STL_DEFAULT_ALLOCATOR macro.
	* stl/bits/stl_list.h (class list): Likewise.
	* stl/bits/stl_multiset.h (class multiset): Likewise.
	* stl/bits/stl_set.h (class set): Likewise.
	* stl/bits/stl_string_fwd.h (class basic_string): Likewise.
	* stl/bits/stl_tree.h (class _Rb_tree, class rb_tree): Likewise.
	* stl/bits/stl_vector.h (class vector): Likewise.
	* stl/ext/ropeimpl.h (rotate): Likewise.
	* stl/ext/hash_map (class hash_map, class hash_multimap):
	Likewise.
	* stl/ext/hash_set (class hash_set, class hash_multiset):
	Likewise.
	* stl/ext/slist (class slist): Likewise.
	* stl/ext/stl_bvector.h (class bit_vector): Likewise.
	* stl/ext/stl_rope.h (class rope): Likewise.
	* src/locale.cc (_Impl): Likewise.
	* src/localename.cc (_Impl): Likewise.
	* bits/localefwd.h (_Impl): Likewise.



Index: bits/localefwd.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/localefwd.h,v
retrieving revision 1.7
diff -u -p -r1.7 localefwd.h
--- localefwd.h	2000/03/21 06:24:04	1.7
+++ localefwd.h	2000/04/11 04:28:01
@@ -312,8 +312,8 @@ namespace std
   // locale implementation object
   class locale::_Impl
   {
-    typedef vector<facet*, __STL_DEFAULT_ALLOCATOR(facet*)> __vec_facet;
-    typedef vector<string, __STL_DEFAULT_ALLOCATOR(string)> __vec_string;
+    typedef vector<facet*, allocator<facet*> > __vec_facet;
+    typedef vector<string, allocator<string> > __vec_string;
 
     // Friends:
     friend class locale;
Index: src/locale.cc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/locale.cc,v
retrieving revision 1.39
diff -u -p -r1.39 locale.cc
--- locale.cc	2000/03/21 06:24:06	1.39
+++ locale.cc	2000/04/11 04:28:01
@@ -58,8 +58,8 @@ namespace std {
   , _M_cached_name_ok(false)
   , _M_cached_name(string ("*"))
   { 
-    typedef vector<facet*, __STL_DEFAULT_ALLOCATOR(facet*) > __vec_facet;
-    typedef vector<string, __STL_DEFAULT_ALLOCATOR(string) > __vec_string;
+    typedef vector<facet*, allocator<facet*> > __vec_facet;
+    typedef vector<string, allocator<string> > __vec_string;
 
     auto_ptr<__vec_facet> __pvf(new __vec_facet(__numfacets, (facet*)0));
     auto_ptr<__vec_string> __pcn(new __vec_string(_S_num_categories,
@@ -76,8 +76,8 @@ namespace std {
   , _M_cached_name_ok(__other._M_cached_name_ok)
   , _M_cached_name(__other._M_cached_name)
   {
-    typedef vector<facet*, __STL_DEFAULT_ALLOCATOR(facet*) > __vec_facet;
-    typedef vector<string, __STL_DEFAULT_ALLOCATOR(string) > __vec_string;
+    typedef vector<facet*, allocator<facet*> > __vec_facet;
+    typedef vector<string, allocator<string> > __vec_string;
 
     auto_ptr<__vec_facet> __pvf(new __vec_facet(*(__other._M_facets)));
     auto_ptr<__vec_string> 
Index: src/localename.cc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/localename.cc,v
retrieving revision 1.9
diff -u -p -r1.9 localename.cc
--- localename.cc	2000/03/21 06:24:06	1.9
+++ localename.cc	2000/04/11 04:28:01
@@ -49,8 +49,8 @@ namespace std {
     , _M_has_name(other._M_has_name), _M_cached_name_ok(false)
   {
 #if 1
-    typedef vector<facet*, __STL_DEFAULT_ALLOCATOR(facet*) > __vec_facet;
-    typedef vector<string, __STL_DEFAULT_ALLOCATOR(string) > __vec_string;
+    typedef vector<facet*, allocator<facet*> > __vec_facet;
+    typedef vector<string, allocator<string> > __vec_string;
     try {
       _M_facets = new __vec_facet(*(other._M_facets));
     }
Index: stl/bits/stl_config.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_config.h,v
retrieving revision 1.26
diff -u -p -r1.26 stl_config.h
--- stl_config.h	2000/03/31 23:29:27	1.26
+++ stl_config.h	2000/04/11 04:28:02
@@ -368,12 +368,6 @@
 #   define typename
 # endif
 
-# ifdef __STL_LIMITED_DEFAULT_TEMPLATES
-#   define __STL_DEPENDENT_DEFAULT_TMPL(_Tp)
-# else
-#   define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) = _Tp
-# endif
-
 # ifdef __STL_MEMBER_TEMPLATE_KEYWORD
 #   define __STL_TEMPLATE template
 # else
@@ -409,14 +403,6 @@
     !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \
     !defined(__STL_USE_SGI_ALLOCATORS) 
 #   define __STL_USE_STD_ALLOCATORS
-# endif
-
-# ifndef __STL_DEFAULT_ALLOCATOR
-#   ifdef __STL_USE_STD_ALLOCATORS
-#     define __STL_DEFAULT_ALLOCATOR(T) allocator< T >
-#   else
-#     define __STL_DEFAULT_ALLOCATOR(T) alloc
-#   endif
 # endif
 
 // __STL_NO_NAMESPACES is a hook so that users can disable namespaces
Index: stl/bits/stl_deque.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_deque.h,v
retrieving revision 1.14
diff -u -p -r1.14 stl_deque.h
--- stl_deque.h	1999/11/12 08:53:07	1.14
+++ stl_deque.h	2000/04/11 04:28:02
@@ -481,7 +481,7 @@ _Deque_base<_Tp,_Alloc,__bufsiz>::_M_des
 // See __deque_buf_size().  The only reason that the default value is 0
 //  is as a workaround for bugs in the way that some compilers handle
 //  constant expressions.
-template <class _Tp, class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp), 
+template <class _Tp, class _Alloc = allocator<_Tp>, 
           size_t __bufsiz = 0> 
 class deque : protected _Deque_base<_Tp, _Alloc, __bufsiz> {
   typedef _Deque_base<_Tp, _Alloc, __bufsiz> _Base;
Index: stl/bits/stl_function.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_function.h,v
retrieving revision 1.10
diff -u -p -r1.10 stl_function.h
--- stl_function.h	1999/02/10 01:00:19	1.10
+++ stl_function.h	2000/04/11 04:28:02
@@ -409,7 +409,7 @@ struct constant_void_fun : public _Const
 
 
 template <class _Result,
-          class _Argument __STL_DEPENDENT_DEFAULT_TMPL(_Result)>
+          class _Argument = _Result>
 struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument>
 {
   constant_unary_fun(const _Result& __v)
@@ -418,8 +418,8 @@ struct constant_unary_fun : public _Cons
 
 
 template <class _Result,
-          class _Arg1 __STL_DEPENDENT_DEFAULT_TMPL(_Result),
-          class _Arg2 __STL_DEPENDENT_DEFAULT_TMPL(_Arg1)>
+          class _Arg1 = _Result,
+          class _Arg2 = _Arg1>
 struct constant_binary_fun
   : public _Constant_binary_fun<_Result, _Arg1, _Arg2>
 {
Index: stl/bits/stl_iterator.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_iterator.h,v
retrieving revision 1.19
diff -u -p -r1.19 stl_iterator.h
--- stl_iterator.h	1999/06/16 01:46:12	1.19
+++ stl_iterator.h	2000/04/11 04:28:02
@@ -157,13 +157,8 @@ insert_iterator<_Container> inserter(_Co
   return insert_iterator<_Container>(__x, __iter(__i));
 }
 
-#ifndef __STL_LIMITED_DEFAULT_TEMPLATES
 template <class _BidirectionalIterator, class _Tp, class _Reference = _Tp&, 
           class _Distance = ptrdiff_t> 
-#else
-template <class _BidirectionalIterator, class _Tp, class _Reference, 
-          class _Distance> 
-#endif
 class reverse_bidirectional_iterator {
   typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, 
                                          _Reference, _Distance>  _Self;
@@ -404,13 +399,8 @@ operator+(typename reverse_iterator<_Ite
 // This is the old version of reverse_iterator, as found in the original
 //  HP STL.  It does not use partial specialization.
 
-#ifndef __STL_LIMITED_DEFAULT_TEMPLATES
 template <class _RandomAccessIterator, class _Tp, class _Reference = _Tp&,
           class _Distance = ptrdiff_t> 
-#else
-template <class _RandomAccessIterator, class _Tp, class _Reference,
-          class _Distance> 
-#endif
 class reverse_iterator {
   typedef reverse_iterator<_RandomAccessIterator, _Tp, _Reference, _Distance>
         _Self;
Index: stl/bits/stl_list.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_list.h,v
retrieving revision 1.10
diff -u -p -r1.10 stl_list.h
--- stl_list.h	1999/04/06 17:44:11	1.10
+++ stl_list.h	2000/04/11 04:28:02
@@ -243,7 +243,7 @@ _List_base<_Tp,_Alloc>::clear() 
   _M_node->_M_prev = _M_node;
 }
 
-template <class _Tp, class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
+template <class _Tp, class _Alloc = allocator<_Tp> >
 class list : protected _List_base<_Tp, _Alloc> {
   typedef _List_base<_Tp, _Alloc> _Base;
 protected:
Index: stl/bits/stl_multiset.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_multiset.h,v
retrieving revision 1.6
diff -u -p -r1.6 stl_multiset.h
--- stl_multiset.h	1999/05/05 00:39:24	1.6
+++ stl_multiset.h	2000/04/11 04:28:02
@@ -40,8 +40,8 @@ __STL_BEGIN_NAMESPACE
 
 // Forward declaration of operators < and ==, needed for friend declaration.
 
-template <class _Key, class _Compare __STL_DEPENDENT_DEFAULT_TMPL(less<_Key>),
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Key) >
+template <class _Key, class _Compare = less<_Key>,
+          class _Alloc = allocator<_Key> >
 class multiset;
 
 template <class _Key, class _Compare, class _Alloc>
Index: stl/bits/stl_queue.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_queue.h,v
retrieving revision 1.10
diff -u -p -r1.10 stl_queue.h
--- stl_queue.h	1999/11/19 01:31:25	1.10
+++ stl_queue.h	2000/04/11 04:28:02
@@ -36,7 +36,7 @@ __STL_BEGIN_NAMESPACE
 // Forward declarations of operators < and ==, needed for friend declaration.
 
 template <class _Tp, 
-          class _Sequence __STL_DEPENDENT_DEFAULT_TMPL(deque<_Tp>) >
+          class _Sequence = deque<_Tp> >
 class queue;
 
 template <class _Tp, class _Seq>
@@ -133,9 +133,8 @@ operator>=(const queue<_Tp, _Sequence>& 
 #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
 
 template <class _Tp, 
-          class _Sequence __STL_DEPENDENT_DEFAULT_TMPL(vector<_Tp>),
-          class _Compare
-          __STL_DEPENDENT_DEFAULT_TMPL(less<typename _Sequence::value_type>) >
+          class _Sequence = vector<_Tp>,
+          class _Compare = less<typename _Sequence::value_type> >
 class priority_queue {
 public:
   typedef typename _Sequence::value_type      value_type;
Index: stl/bits/stl_set.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_set.h,v
retrieving revision 1.6
diff -u -p -r1.6 stl_set.h
--- stl_set.h	1999/05/05 00:39:26	1.6
+++ stl_set.h	2000/04/11 04:28:02
@@ -40,8 +40,8 @@ __STL_BEGIN_NAMESPACE
 
 // Forward declarations of operators < and ==, needed for friend declaration.
 
-template <class _Key, class _Compare __STL_DEPENDENT_DEFAULT_TMPL(less<_Key>),
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Key) >
+template <class _Key, class _Compare = less<_Key>,
+          class _Alloc = allocator<_Key> >
 class set;
 
 template <class _Key, class _Compare, class _Alloc>
Index: stl/bits/stl_stack.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_stack.h,v
retrieving revision 1.10
diff -u -p -r1.10 stl_stack.h
--- stl_stack.h	1999/05/05 00:39:27	1.10
+++ stl_stack.h	2000/04/11 04:28:02
@@ -36,7 +36,7 @@ __STL_BEGIN_NAMESPACE
 // Forward declarations of operators == and <, needed for friend declaration.
 
 template <class _Tp, 
-          class _Sequence __STL_DEPENDENT_DEFAULT_TMPL(deque<_Tp>) >
+          class _Sequence = deque<_Tp> >
 class stack;
 
 template <class _Tp, class _Seq>
Index: stl/bits/stl_string_fwd.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_string_fwd.h,v
retrieving revision 1.12
diff -u -p -r1.12 stl_string_fwd.h
--- stl_string_fwd.h	2000/02/26 00:42:58	1.12
+++ stl_string_fwd.h	2000/04/11 04:28:02
@@ -23,7 +23,7 @@ __STL_BEGIN_NAMESPACE
 template <class _CharT> struct char_traits;
 template <class _CharT, 
           class _Traits = char_traits<_CharT>, 
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_CharT) >
+          class _Alloc = allocator<_CharT> >
 class basic_string;
 
 typedef basic_string<char>    string;
Index: stl/bits/stl_tree.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_tree.h,v
retrieving revision 1.12
diff -u -p -r1.12 stl_tree.h
--- stl_tree.h	1999/07/12 11:33:08	1.12
+++ stl_tree.h	2000/04/11 04:28:02
@@ -519,7 +519,7 @@ protected:
 #endif /* __STL_USE_STD_ALLOCATORS */
 
 template <class _Key, class _Value, class _KeyOfValue, class _Compare,
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Value) >
+          class _Alloc = allocator<_Value> >
 class _Rb_tree : protected _Rb_tree_base<_Value, _Alloc> {
   typedef _Rb_tree_base<_Value, _Alloc> _Base;
 protected:
@@ -1342,7 +1342,7 @@ bool _Rb_tree<_Key,_Value,_KeyOfValue,_C
 // compatibility with the HP STL.
 
 template <class _Key, class _Value, class _KeyOfValue, class _Compare,
-          class _Alloc = __STL_DEFAULT_ALLOCATOR(_Value) >
+          class _Alloc = allocator<_Value> >
 struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
 {
   typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
Index: stl/bits/stl_vector.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/bits/stl_vector.h,v
retrieving revision 1.18
diff -u -p -r1.18 stl_vector.h
--- stl_vector.h	2000/03/13 07:11:11	1.18
+++ stl_vector.h	2000/04/11 04:28:02
@@ -151,7 +151,7 @@ protected:
 
 #endif /* __STL_USE_STD_ALLOCATORS */
 
-template <class _Tp, class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
+template <class _Tp, class _Alloc = allocator<_Tp> >
 class vector : protected _Vector_base<_Tp, _Alloc> 
 {
 private:
Index: stl/ext/hash_map
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/hash_map,v
retrieving revision 1.3
diff -u -p -r1.3 hash_map
--- hash_map	1999/06/24 02:29:10	1.3
+++ hash_map	2000/04/11 04:28:02
@@ -43,9 +43,9 @@ __STL_BEGIN_NAMESPACE
 // Forward declaration of equality operator; needed for friend declaration.
 
 template <class _Key, class _Tp,
-          class _HashFcn  __STL_DEPENDENT_DEFAULT_TMPL(hash<_Key>),
-          class _EqualKey __STL_DEPENDENT_DEFAULT_TMPL(equal_to<_Key>),
-          class _Alloc =  __STL_DEFAULT_ALLOCATOR(_Tp) >
+          class _HashFcn  = hash<_Key>,
+          class _EqualKey = equal_to<_Key>,
+          class _Alloc =  allocator<_Tp> >
 class hash_map;
 
 template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
@@ -246,9 +246,9 @@ swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,
 // Forward declaration of equality operator; needed for friend declaration.
 
 template <class _Key, class _Tp,
-          class _HashFcn  __STL_DEPENDENT_DEFAULT_TMPL(hash<_Key>),
-          class _EqualKey __STL_DEPENDENT_DEFAULT_TMPL(equal_to<_Key>),
-          class _Alloc =  __STL_DEFAULT_ALLOCATOR(_Tp) >
+          class _HashFcn  = hash<_Key>,
+          class _EqualKey = equal_to<_Key>,
+          class _Alloc =  allocator<_Tp> >
 class hash_multimap;
 
 template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
Index: stl/ext/hash_set
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/hash_set,v
retrieving revision 1.3
diff -u -p -r1.3 hash_set
--- hash_set	1999/06/24 02:29:11	1.3
+++ hash_set	2000/04/11 04:28:02
@@ -43,9 +43,9 @@ __STL_BEGIN_NAMESPACE
 // Forward declaration of equality operator; needed for friend declaration.
 
 template <class _Value,
-          class _HashFcn  __STL_DEPENDENT_DEFAULT_TMPL(hash<_Value>),
-          class _EqualKey __STL_DEPENDENT_DEFAULT_TMPL(equal_to<_Value>),
-          class _Alloc =  __STL_DEFAULT_ALLOCATOR(_Value) >
+          class _HashFcn  = hash<_Value>,
+          class _EqualKey = equal_to<_Value>,
+          class _Alloc =  allocator<_Value> >
 class hash_set;
 
 template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
@@ -240,9 +240,9 @@ swap(hash_set<_Val,_HashFcn,_EqualKey,_A
 
 
 template <class _Value,
-          class _HashFcn  __STL_DEPENDENT_DEFAULT_TMPL(hash<_Value>),
-          class _EqualKey __STL_DEPENDENT_DEFAULT_TMPL(equal_to<_Value>),
-          class _Alloc =  __STL_DEFAULT_ALLOCATOR(_Value) >
+          class _HashFcn  = hash<_Value>,
+          class _EqualKey = equal_to<_Value>,
+          class _Alloc =  allocator<_Value> >
 class hash_multiset;
 
 template <class _Val, class _HashFcn, class _EqualKey, class _Alloc>
Index: stl/ext/ropeimpl.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/ropeimpl.h,v
retrieving revision 1.1
diff -u -p -r1.1 ropeimpl.h
--- ropeimpl.h	1999/05/05 00:46:00	1.1
+++ ropeimpl.h	2000/04/11 04:28:03
@@ -1551,9 +1551,9 @@ _Rope_rotate(_Rope_iterator<_CharT,_Allo
 
 #if !defined(__GNUC__)
 // Appears to confuse g++
-inline void rotate(_Rope_iterator<char,__STL_DEFAULT_ALLOCATOR(char)> __first,
-                   _Rope_iterator<char,__STL_DEFAULT_ALLOCATOR(char)> __middle,
-                   _Rope_iterator<char,__STL_DEFAULT_ALLOCATOR(char)> __last) {
+inline void rotate(_Rope_iterator<char,allocator<char> > __first,
+                   _Rope_iterator<char,allocator<char> > __middle,
+                   _Rope_iterator<char,allocator<char> > __last) {
     _Rope_rotate(__first, __middle, __last);
 }
 #endif
@@ -1567,9 +1567,9 @@ inline void rotate(_Rope_iterator<char,_
 //   for unicode strings.  Unsigned short may be a better character
 //   type.
 inline void rotate(
-		_Rope_iterator<wchar_t,__STL_DEFAULT_ALLOCATOR(char)> __first,
-                _Rope_iterator<wchar_t,__STL_DEFAULT_ALLOCATOR(char)> __middle,
-                _Rope_iterator<wchar_t,__STL_DEFAULT_ALLOCATOR(char)> __last) {
+		_Rope_iterator<wchar_t,allocator<char> > __first,
+                _Rope_iterator<wchar_t,allocator<char> > __middle,
+                _Rope_iterator<wchar_t,allocator<char> > __last) {
     _Rope_rotate(__first, __middle, __last);
 }
 # endif
Index: stl/ext/slist
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/slist,v
retrieving revision 1.3
diff -u -p -r1.3 slist
--- slist	1999/06/24 02:29:12	1.3
+++ slist	2000/04/11 04:28:03
@@ -312,7 +312,7 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(
   return __last_node;
 }
 
-template <class _Tp, class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >
+template <class _Tp, class _Alloc = allocator<_Tp> >
 class slist : private _Slist_base<_Tp,_Alloc>
 {
 private:
Index: stl/ext/stl_bvector.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/stl_bvector.h,v
retrieving revision 1.1
diff -u -p -r1.1 stl_bvector.h
--- stl_bvector.h	1999/05/05 00:46:00	1.1
+++ stl_bvector.h	2000/04/11 04:28:03
@@ -374,13 +374,13 @@ template<class _Alloc> class vector<bool
   : public _Bvector_base<_Alloc>
 #      else /* __SGI_STL_VECBOOL_TEMPLATE */
 class bit_vector
-  : public _Bvector_base<__STL_DEFAULT_ALLOCATOR(bool) >
+  : public _Bvector_base<allocator<bool> >
 #      endif /* __SGI_STL_VECBOOL_TEMPLATE */
 {
 #      ifdef __SGI_STL_VECBOOL_TEMPLATE
   typedef _Bvector_base<_Alloc> _Base;
 #      else /* __SGI_STL_VECBOOL_TEMPLATE */
-  typedef _Bvector_base<__STL_DEFAULT_ALLOCATOR(bool) > _Base;
+  typedef _Bvector_base<allocator<bool> > _Base;
 #      endif /* __SGI_STL_VECBOOL_TEMPLATE */
 public:
   typedef bool value_type;
Index: stl/ext/stl_rope.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/stl/ext/stl_rope.h,v
retrieving revision 1.2
diff -u -p -r1.2 stl_rope.h
--- stl_rope.h	1999/11/10 21:39:30	1.2
+++ stl_rope.h	2000/04/11 04:28:03
@@ -208,7 +208,7 @@ class _Rope_char_consumer {
 // First a lot of forward declarations.  The standard seems to require
 // much stricter "declaration before use" than many of the implementations
 // that preceded it.
-template<class _CharT, class _Alloc=__STL_DEFAULT_ALLOCATOR(_CharT)> class rope;
+template<class _CharT, class _Alloc=allocator<_CharT> > class rope;
 template<class _CharT, class _Alloc> struct _Rope_RopeConcatenation;
 template<class _CharT, class _Alloc> struct _Rope_RopeLeaf;
 template<class _CharT, class _Alloc> struct _Rope_RopeFunction;
@@ -834,7 +834,7 @@ class _Rope_char_ref_proxy {
         __b = __tmp; \
     }
 
-_ROPE_SWAP_SPECIALIZATION(char,__STL_DEFAULT_ALLOCATOR(char))
+_ROPE_SWAP_SPECIALIZATION(char,allocator<char>)
 
 #endif /* !__STL_FUNCTION_TMPL_PARTIAL_ORDER */
 

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