]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/30085 (switch debug mode hash containers from ext to tr1)
authorBenjamin Kosnik <bkoz@redhat.com>
Thu, 18 Oct 2007 15:22:58 +0000 (15:22 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 18 Oct 2007 15:22:58 +0000 (15:22 +0000)
2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>

* include/ext/hash_map: To...
* include/backward/hash_map: ...here. Remove debug mode.
* include/ext/hash_set: To...
* include/backward/hash_set: ...here. Remove debug mode.
* include/ext/hash_fun.h: To...
* include/backward/hash_fun.h: ...here.
* include/ext/hashtable.h: To...
* include/backward/hashtable.h: ...here.

* include/bits/c++config: Remove __gnu_cxx namespace from debug mode.
* include/debug/debug.h: Same.

* include/debug/hash_map: Remove.
* include/debug/hash_multimap.h: Remove.
* include/debug/hash_set.h: Remove.
* include/debug/hash_set: Remove.
* include/debug/hash_multiset.h: Remove.
* include/debug/hash_map.h: Remove.

* include/Makefile.am (ext_headers): Move hash_set, hash_map to
backward.
(debug_headers): Remove hash_map, hash_set, hash_map.h,
hash_map.h, hash_multiset.h, hash_multimap.h.
* include/Makefile.in: Regenerate.

* docs/html/debug.html: Update.
* docs/html/ext/howto.html: Same.
* docs/html/faq/index.html: Same.
* docs/doxygen/Intro.3: Same.
* docs/doxygen/user.cfg.in: Adjust includes.
* testsuite/ext/hash_map: Move to...
* testsuite/backward/hash_map: ...here.
* testsuite/ext/hash_set: Move to...
* testsuite/backward/hash_set: ...here.

2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>

Removal of pre-ISO C++ items from include/backwards.
* include/Makefile.am (backward_headers): Remove all but strstream,
backward_warning.h.
* include/Makefile.in: Regenerate.
* include/backward/new.h: Remove.
* include/backward/iterator.h: Same.
* include/backward/alloc.h: Same.
* include/backward/set.h: Same.
* include/backward/hashtable.h: Same.
* include/backward/hash_set.h: Same.
* include/backward/fstream.h: Same.
* include/backward/tempbuf.h: Same.
* include/backward/istream.h: Same.
* include/backward/bvector.h: Same.
* include/backward/stack.h: Same.
* include/backward/rope.h: Same.
* include/backward/complex.h: Same.
* include/backward/ostream.h: Same.
* include/backward/heap.h: Same.
* include/backward/iostream.h: Same.
* include/backward/function.h: Same.
* include/backward/multimap.h: Same.
* include/backward/pair.h: Same.
* include/backward/stream.h: Same.
* include/backward/iomanip.h: Same.
* include/backward/slist.h: Same.
* include/backward/tree.h: Same.
* include/backward/vector.h: Same.
* include/backward/deque.h: Same.
* include/backward/multiset.h: Same.
* include/backward/defalloc.h: Same.
* include/backward/list.h: Same.
* include/backward/map.h: Same.
* include/backward/algobase.h: Same.
* include/backward/hash_map.h: Same.
* include/backward/algo.h: Same.
* include/backward/queue.h: Same.
* include/backward/streambuf.h: Same.
* testsuite/backward/header_hash_set_h.cc: Same.
* testsuite/backward/header_slist_h.cc: Same.
* testsuite/backward/header_hash_map_h.cc: Same.
* testsuite/backward/header_tempbuf_h.cc: Same.
* testsuite/backward/header_deque_h.cc: Same.
* testsuite/backward/header_rope_h.cc: Same.
* testsuite/backward/header_iterator_h.cc: Same.
* testsuite/backward/header_hashtable_h.cc: Same.

2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>

PR libstdc++/30085
* include/debug/unordered_map: New.
* include/debug/unordered_set: New.
* include/debug/safe_association.h: New.
* include/std/unordered_map: Include debug header if _GLIBCXX_DEBUG.
* include/std/unordered_set: Same.
* include/Makefile.am (debug_headers): Add unordered_map,
unordered_set, safe_association.h.
* include/Makefile.in: Regenerate.
* testsuite/23_containers/unordered_map/requirements/debug.cc: New.
* testsuite/23_containers/unordered_multimap/requirements/
debug.cc: New.
* testsuite/23_containers/unordered_set/requirements/debug.cc: New.
* testsuite/23_containers/unordered_multiset/requirements/
debug.cc: New.

2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/util/native_type/assoc/native_hash_multimap.hpp: Remove
hash_map include.

From-SVN: r129442

76 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config.h.in
libstdc++-v3/docs/doxygen/Intro.3
libstdc++-v3/docs/doxygen/user.cfg.in
libstdc++-v3/docs/html/debug.html
libstdc++-v3/docs/html/ext/howto.html
libstdc++-v3/docs/html/faq/index.html
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/backward/algo.h [deleted file]
libstdc++-v3/include/backward/algobase.h [deleted file]
libstdc++-v3/include/backward/alloc.h [deleted file]
libstdc++-v3/include/backward/backward_warning.h
libstdc++-v3/include/backward/bvector.h [deleted file]
libstdc++-v3/include/backward/complex.h [deleted file]
libstdc++-v3/include/backward/defalloc.h [deleted file]
libstdc++-v3/include/backward/deque.h [deleted file]
libstdc++-v3/include/backward/fstream.h [deleted file]
libstdc++-v3/include/backward/function.h [deleted file]
libstdc++-v3/include/backward/hash_fun.h [moved from libstdc++-v3/include/ext/hash_fun.h with 99% similarity]
libstdc++-v3/include/backward/hash_map [moved from libstdc++-v3/include/ext/hash_map with 98% similarity]
libstdc++-v3/include/backward/hash_map.h [deleted file]
libstdc++-v3/include/backward/hash_set [moved from libstdc++-v3/include/ext/hash_set with 98% similarity]
libstdc++-v3/include/backward/hash_set.h [deleted file]
libstdc++-v3/include/backward/hashtable.h
libstdc++-v3/include/backward/heap.h [deleted file]
libstdc++-v3/include/backward/iomanip.h [deleted file]
libstdc++-v3/include/backward/iostream.h [deleted file]
libstdc++-v3/include/backward/istream.h [deleted file]
libstdc++-v3/include/backward/iterator.h [deleted file]
libstdc++-v3/include/backward/list.h [deleted file]
libstdc++-v3/include/backward/map.h [deleted file]
libstdc++-v3/include/backward/multimap.h [deleted file]
libstdc++-v3/include/backward/multiset.h [deleted file]
libstdc++-v3/include/backward/new.h [deleted file]
libstdc++-v3/include/backward/ostream.h [deleted file]
libstdc++-v3/include/backward/pair.h [deleted file]
libstdc++-v3/include/backward/queue.h [deleted file]
libstdc++-v3/include/backward/rope.h [deleted file]
libstdc++-v3/include/backward/set.h [deleted file]
libstdc++-v3/include/backward/slist.h [deleted file]
libstdc++-v3/include/backward/stack.h [deleted file]
libstdc++-v3/include/backward/stream.h [deleted file]
libstdc++-v3/include/backward/streambuf.h [deleted file]
libstdc++-v3/include/backward/tempbuf.h [deleted file]
libstdc++-v3/include/backward/tree.h [deleted file]
libstdc++-v3/include/backward/vector.h [deleted file]
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/debug/debug.h
libstdc++-v3/include/debug/hash_map [deleted file]
libstdc++-v3/include/debug/hash_map.h [deleted file]
libstdc++-v3/include/debug/hash_multimap.h [deleted file]
libstdc++-v3/include/debug/hash_multiset.h [deleted file]
libstdc++-v3/include/debug/hash_set [deleted file]
libstdc++-v3/include/debug/safe_association.h [moved from libstdc++-v3/include/debug/hash_set.h with 50% similarity]
libstdc++-v3/include/debug/unordered_map [new file with mode: 0644]
libstdc++-v3/include/debug/unordered_set [new file with mode: 0644]
libstdc++-v3/include/ext/hashtable.h [deleted file]
libstdc++-v3/include/std/unordered_map
libstdc++-v3/include/std/unordered_set
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc [moved from libstdc++-v3/testsuite/backward/header_deque_h.cc with 57% similarity]
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc [moved from libstdc++-v3/testsuite/backward/header_hashtable_h.cc with 75% similarity]
libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc [moved from libstdc++-v3/testsuite/backward/header_rope_h.cc with 76% similarity]
libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc [moved from libstdc++-v3/testsuite/backward/header_slist_h.cc with 59% similarity]
libstdc++-v3/testsuite/backward/hash_map/1.cc [moved from libstdc++-v3/testsuite/ext/hash_map/1.cc with 95% similarity]
libstdc++-v3/testsuite/backward/hash_map/14648.cc [moved from libstdc++-v3/testsuite/ext/hash_map/14648.cc with 90% similarity]
libstdc++-v3/testsuite/backward/hash_map/23528.cc [moved from libstdc++-v3/testsuite/ext/hash_map/23528.cc with 95% similarity]
libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc [moved from libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc with 92% similarity]
libstdc++-v3/testsuite/backward/hash_set/1.cc [moved from libstdc++-v3/testsuite/ext/hash_set/1.cc with 90% similarity]
libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc [moved from libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc with 96% similarity]
libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc [moved from libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc with 92% similarity]
libstdc++-v3/testsuite/backward/header_hash_map_h.cc [deleted file]
libstdc++-v3/testsuite/backward/header_hash_set_h.cc [deleted file]
libstdc++-v3/testsuite/backward/header_iterator_h.cc [deleted file]
libstdc++-v3/testsuite/backward/header_tempbuf_h.cc [deleted file]
libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp

index 7fb26d327d8b57b11d8827c90ac9d97aa98c7e64..7014fbcdd42adfe4f08b10cb364048e19dab47cc 100644 (file)
@@ -1,3 +1,112 @@
+2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/ext/hash_map: To...
+       * include/backward/hash_map: ...here. Remove debug mode.
+       * include/ext/hash_set: To...
+       * include/backward/hash_set: ...here. Remove debug mode.
+       * include/ext/hash_fun.h: To...
+       * include/backward/hash_fun.h: ...here.
+       * include/ext/hashtable.h: To...
+       * include/backward/hashtable.h: ...here.
+       
+       * include/bits/c++config: Remove __gnu_cxx namespace from debug mode.
+       * include/debug/debug.h: Same.
+               
+       * include/debug/hash_map: Remove.
+       * include/debug/hash_multimap.h: Remove.
+       * include/debug/hash_set.h: Remove.
+       * include/debug/hash_set: Remove.
+       * include/debug/hash_multiset.h: Remove.
+       * include/debug/hash_map.h: Remove.
+       
+       * include/Makefile.am (ext_headers): Move hash_set, hash_map to
+       backward.
+       (debug_headers): Remove hash_map, hash_set, hash_map.h,
+       hash_map.h, hash_multiset.h, hash_multimap.h.   
+       * include/Makefile.in: Regenerate.
+
+       * docs/html/debug.html: Update.
+       * docs/html/ext/howto.html: Same.
+       * docs/html/faq/index.html: Same.
+       * docs/doxygen/Intro.3: Same.
+       * docs/doxygen/user.cfg.in: Adjust includes.
+       * testsuite/ext/hash_map: Move to...
+       * testsuite/backward/hash_map: ...here.
+       * testsuite/ext/hash_set: Move to...
+       * testsuite/backward/hash_set: ...here.
+       
+2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>
+        
+       Removal of pre-ISO C++ items from include/backwards.
+       * include/Makefile.am (backward_headers): Remove all but strstream,
+       backward_warning.h.
+       * include/Makefile.in: Regenerate.
+       * include/backward/new.h: Remove.
+       * include/backward/iterator.h: Same.
+       * include/backward/alloc.h: Same.
+       * include/backward/set.h: Same.
+       * include/backward/hashtable.h: Same.
+       * include/backward/hash_set.h: Same.
+       * include/backward/fstream.h: Same.
+       * include/backward/tempbuf.h: Same.
+       * include/backward/istream.h: Same.
+       * include/backward/bvector.h: Same.
+       * include/backward/stack.h: Same.
+       * include/backward/rope.h: Same.
+       * include/backward/complex.h: Same.
+       * include/backward/ostream.h: Same.
+       * include/backward/heap.h: Same.
+       * include/backward/iostream.h: Same.
+       * include/backward/function.h: Same.
+       * include/backward/multimap.h: Same.
+       * include/backward/pair.h: Same.
+       * include/backward/stream.h: Same.
+       * include/backward/iomanip.h: Same.
+       * include/backward/slist.h: Same.
+       * include/backward/tree.h: Same.
+       * include/backward/vector.h: Same.
+       * include/backward/deque.h: Same.
+       * include/backward/multiset.h: Same.
+       * include/backward/defalloc.h: Same.
+       * include/backward/list.h: Same.
+       * include/backward/map.h: Same.
+       * include/backward/algobase.h: Same.
+       * include/backward/hash_map.h: Same.
+       * include/backward/algo.h: Same.
+       * include/backward/queue.h: Same.
+       * include/backward/streambuf.h: Same.
+       * testsuite/backward/header_hash_set_h.cc: Same.
+       * testsuite/backward/header_slist_h.cc: Same.
+       * testsuite/backward/header_hash_map_h.cc: Same.
+       * testsuite/backward/header_tempbuf_h.cc: Same.
+       * testsuite/backward/header_deque_h.cc: Same.
+       * testsuite/backward/header_rope_h.cc: Same.
+       * testsuite/backward/header_iterator_h.cc: Same.
+       * testsuite/backward/header_hashtable_h.cc: Same.
+
+2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>
+
+       PR libstdc++/30085
+       * include/debug/unordered_map: New.
+       * include/debug/unordered_set: New.
+       * include/debug/safe_association.h: New.        
+       * include/std/unordered_map: Include debug header if _GLIBCXX_DEBUG.
+       * include/std/unordered_set: Same.
+       * include/Makefile.am (debug_headers): Add unordered_map,
+       unordered_set, safe_association.h.
+       * include/Makefile.in: Regenerate.
+       * testsuite/23_containers/unordered_map/requirements/debug.cc: New.
+       * testsuite/23_containers/unordered_multimap/requirements/
+       debug.cc: New.
+       * testsuite/23_containers/unordered_set/requirements/debug.cc: New.
+       * testsuite/23_containers/unordered_multiset/requirements/
+       debug.cc: New.
+
+2007-10-18  Benjamin Kosnik  <bkoz@redhat.com>
+       
+       * testsuite/util/native_type/assoc/native_hash_multimap.hpp: Remove
+       hash_map include.
+
 2007-10-18  Paolo Carlini  <pcarlini@suse.de>
 
        PR libstdc++/33807
index 4a9ffb763cfe5f530423269984cb6dc428c58af7..1c7bcd3f9ccaa6ff2c7dba594fb40ec0f6eee190 100644 (file)
@@ -84,6 +84,9 @@
 /* Define if ENOTRECOVERABLE exists. */
 #undef HAVE_ENOTRECOVERABLE
 
+/* Define if EOVERFLOW exists. */
+#undef HAVE_EOVERFLOW
+
 /* Define if EOWNERDEAD exists. */
 #undef HAVE_EOWNERDEAD
 
index 48cb31f87f117fc1e2cf951d997757cefab3e58c..cb3ff2e4a1eaf027a1088000863f5320c4b4f3f7 100644 (file)
@@ -77,15 +77,7 @@ read FAQ 5.4 and use a
 prefix.
 .TS
 lB lB lB lB.
-<algo.h>      <hash_map.h>   <map.h>       <slist.h>
-<algobase.h>  <hash_set.h>   <multimap.h>  <stack.h>
-<alloc.h>     <hashtable.h>  <multiset.h>  <stream.h>
-<bvector.h>   <heap.h>       <new.h>       <streambuf.h>
-<complex.h>   <iomanip.h>    <ostream.h>   <strstream>
-<defalloc.h>  <iostream.h>   <pair.h>      <strstream.h>
-<deque.h>     <istream.h>    <queue.h>     <tempbuf.h>
-<fstream.h>   <iterator.h>   <rope.h>      <tree.h>
-<function.h>  <list.h>       <set.h>       <vector.h>
+<strstream>
 .TE
 .SS Extension Headers
 These headers will only be found automatically if you include the leading
@@ -98,7 +90,6 @@ lB lB.
 <ext/algorithm>            <ext/numeric>            
 <ext/functional>           <ext/iterator>
 <ext/slist>                <ext/rb_tree>  
-<ext/hash_map>             <ext/hash_set>           
 <ext/rope>                 <ext/memory>               
 <ext/bitmap_allocator.h>   <ext/debug_allocator.h>    
 <ext/malloc_allocator.h>   <ext/mt_allocator.h>     
index 6b8cca1c87183b26a9470820cc49fdf3078c0ff4..20a041e0f99bd211b6d29c124d6aeb5eeda27f0f 100644 (file)
@@ -542,10 +542,10 @@ INPUT                  = @srcdir@/docs/doxygen/doxygroups.cc \
                          include/utility \
                          include/valarray \
                          include/vector \
+                         include/backward/hash_map \
+                         include/backward/hash_set \
                          include/debug/bitset \
                          include/debug/deque \
-                         include/debug/hash_map \
-                         include/debug/hash_set \
                          include/debug/list \
                          include/debug/map \
                          include/debug/set \
@@ -553,8 +553,6 @@ INPUT                  = @srcdir@/docs/doxygen/doxygroups.cc \
                          include/debug/vector \
                          include/ext/algorithm \
                          include/ext/functional \
-                         include/ext/hash_map \
-                         include/ext/hash_set \
                          include/ext/iterator \
                          include/ext/memory \
                          include/ext/numeric \
index 6013115fe13375a687e5f1d38f9854b774926d8d..60e8418a6342f8a2a150eff0b7ee9f012b65b118 100644 (file)
     <td>__gnu_debug::vector</td>
     <td>&lt;debug/vector&gt;</td>
   </tr>
+</table>
+
+<p>In addition, when compiling in C++0x mode, these additional
+containers have additional debug capability.
+</p>
+
+<table>
   <tr>
-    <td>__gnu_cxx::hash_map</td>
-    <td>&lt;ext/hash_map&gt;</td>
-    <td>__gnu_debug::hash_map</td>
-    <td>&lt;debug/hash_map&gt;</td>
+    <td>std::unordered_map</td>
+    <td>&lt;unordered_map&gt;</td>
+    <td>__gnu_debug::unordered_map</td>
+    <td>&lt;debug/unordered_map&gt;</td>
   </tr>
   <tr>
-    <td>__gnu_cxx::hash_multimap</td>
-    <td>&lt;ext/hash_map&gt;</td>
-    <td>__gnu_debug::hash_multimap</td>
-    <td>&lt;debug/hash_map&gt;</td>
+    <td>std::unordered_multimap</td>
+    <td>&lt;unordered_map&gt;</td>
+    <td>__gnu_debug::unordered_multimap</td>
+    <td>&lt;debug/unordered_map&gt;</td>
   </tr>
   <tr>
-    <td>__gnu_cxx::hash_set</td>
-    <td>&lt;ext/hash_set&gt;</td>
-    <td>__gnu_debug::hash_set</td>
-    <td>&lt;debug/hash_set&gt;</td>
+    <td>std::unordered_set</td>
+    <td>&lt;unordered_set&gt;</td>
+    <td>__gnu_debug::unordered_set</td>
+    <td>&lt;debug/unordered_set&gt;</td>
   </tr>
   <tr>
-    <td>__gnu_cxx::hash_multiset</td>
-    <td>&lt;ext/hash_set&gt;</td>
-    <td>__gnu_debug::hash_multiset</td>
-    <td>&lt;debug/hash_set&gt;</td>
+    <td>std::unordered_multiset</td>
+    <td>&lt;unordered_set&gt;</td>
+    <td>__gnu_debug::unordered_multiset</td>
+    <td>&lt;debug/unordered_set&gt;</td>
   </tr>
 </table>
 
   <li><code>std::multiset</code></li>
   <li><code>std::set</code></li>
   <li><code>std::vector</code></li>
-  <li><code>__gnu_cxx::hash_map</code></li>
-  <li><code>__gnu_cxx::hash_multimap</code></li>
-  <li><code>__gnu_cxx::hash_multiset</code></li>
-  <li><code>__gnu_cxx::hash_set</code></li>
+  <li><code>std::unordered_map</code></li>
+  <li><code>std::unordered_multimap</code></li>
+  <li><code>std::unordered_set</code></li>
+  <li><code>std::unordered_multiset</code></li>
 </ul>
 
 
index 73881ed02969367876a4d7f1aa54d32cf4548274..cb544aa24c025c5064a47e1db382f2504f4c61c9 100644 (file)
 <h2><a name="1">Ropes and trees and hashes, oh my!</a></h2>
    <p>The SGI headers</p>
    <pre>
-     &lt;bvector&gt;
      &lt;hash_map&gt;
      &lt;hash_set&gt;
      &lt;rope&gt;
      &lt;slist&gt;
-     &lt;tree&gt;
+     &lt;rb_tree&gt;
    </pre>
-   <p>are all here; <code>&lt;bvector&gt;</code> exposes the old bit_vector
-      class that was used before specialization of vector&lt;bool&gt; was
-      available (it's actually a typedef for the specialization now).
+   <p>are all here;
       <code>&lt;hash_map&gt;</code> and <code>&lt;hash_set&gt;</code>
-      are discussed further below.  <code>&lt;rope&gt;</code> is the SGI
-      specialization for large strings (&quot;rope,&quot; &quot;large
-      strings,&quot; get it?  love those SGI folks).
+      are deprecated but available as backwards-compatible extensions,
+      as discussed further below.  <code>&lt;rope&gt;</code> is the
+      SGI specialization for large strings (&quot;rope,&quot;
+      &quot;large strings,&quot; get it?  love those SGI folks).
       <code>&lt;slist&gt;</code> is a singly-linked list, for when the
-      doubly-linked <code>list&lt;&gt;</code> is too much space overhead, and
-      <code>&lt;tree&gt;</code> exposes the red-black tree classes used in the
-      implementation of the standard maps and sets.
+      doubly-linked <code>list&lt;&gt;</code> is too much space
+      overhead, and <code>&lt;rb_tree&gt;</code> exposes the red-black
+      tree classes used in the implementation of the standard maps and
+      sets.
    </p>
-   <p>Okay, about those hashing classes...  I'm going to foist most of the
-      work off onto SGI's own site.
+   <p>Okay, about those hashing classes... these classes have been
+   deprecated by the unordered_set, unordered_multiset, unordered_map,
+   unordered_multimap containers in TR1 and the upcoming C++0x, and
+   may be removed in future releases.
    </p>
    <p>Each of the associative containers map, multimap, set, and multiset
       have a counterpart which uses a
index 298ae37cdb61e3c90cfbddbae1b64404e57bee60..e38732e5833df4d30c11ec48bf0f607956654c62 100644 (file)
@@ -927,7 +927,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
          <!-- Careful, the leading spaces in PRE show up directly. -->
       </p>
       <pre>
-      #include &lt;ext/hash_map&gt; </pre>
+      #include &lt;backward/hash_map&gt; </pre>
       <p>rather than using <code>-I</code> or other options.  This is more
          portable and forward-compatible.  (The situation is the same as
          that of other headers whose directories are not searched directly,
@@ -950,20 +950,20 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
       #ifdef __GNUC__
       #if __GNUC__ &lt; 3
         #include &lt;hash_map.h&gt;
-        namespace Sgi { using ::hash_map; }; // inherit globals
+        namespace extension { using ::hash_map; }; // inherit globals
       #else
-        #include &lt;ext/hash_map&gt;
+        #include &lt;backward/hash_map&gt;
         #if __GNUC_MINOR__ == 0
-          namespace Sgi = std;               // GCC 3.0
+          namespace extension = std;               // GCC 3.0
         #else
-          namespace Sgi = ::__gnu_cxx;       // GCC 3.1 and later
+          namespace extension = ::__gnu_cxx;       // GCC 3.1 and later
         #endif
       #endif
       #else      // ...  there are other compilers, right?
-        namespace Sgi = std;
+        namespace extension = std;
       #endif
 
-      Sgi::hash_map&lt;int,int&gt; my_map; </pre>
+      extension::hash_map&lt;int,int&gt; my_map; </pre>
       <p>This is a bit cleaner than defining typedefs for all the
          instantiations you might need.
       </p>
index 2e2609c23d2afe628687d2dee341094bfd116cae..e1d9e0b6071a90550b25597b7404b9d8fd55065c 100644 (file)
@@ -145,41 +145,11 @@ bits_headers = \
 backward_srcdir = ${glibcxx_srcdir}/include/backward
 backward_builddir = ./backward
 backward_headers = \
-       ${backward_srcdir}/complex.h \
-       ${backward_srcdir}/iomanip.h \
-       ${backward_srcdir}/istream.h \
-       ${backward_srcdir}/ostream.h \
-       ${backward_srcdir}/stream.h \
-       ${backward_srcdir}/streambuf.h \
-       ${backward_srcdir}/algo.h \
-       ${backward_srcdir}/algobase.h \
-       ${backward_srcdir}/alloc.h \
-       ${backward_srcdir}/bvector.h \
-       ${backward_srcdir}/defalloc.h \
-       ${backward_srcdir}/deque.h \
-       ${backward_srcdir}/function.h \
-       ${backward_srcdir}/hash_map.h \
-       ${backward_srcdir}/hash_set.h \
-       ${backward_srcdir}/hashtable.h \
-       ${backward_srcdir}/heap.h \
-       ${backward_srcdir}/iostream.h \
-       ${backward_srcdir}/iterator.h \
-       ${backward_srcdir}/list.h \
-       ${backward_srcdir}/map.h \
-       ${backward_srcdir}/multimap.h \
-       ${backward_srcdir}/new.h \
-       ${backward_srcdir}/multiset.h \
-       ${backward_srcdir}/pair.h \
-       ${backward_srcdir}/queue.h \
-       ${backward_srcdir}/rope.h \
-       ${backward_srcdir}/set.h \
-       ${backward_srcdir}/slist.h \
-       ${backward_srcdir}/stack.h \
-       ${backward_srcdir}/tempbuf.h \
-       ${backward_srcdir}/tree.h \
-       ${backward_srcdir}/vector.h \
-       ${backward_srcdir}/fstream.h \
        ${backward_srcdir}/strstream \
+       ${backward_srcdir}/hash_map \
+       ${backward_srcdir}/hash_set \
+       ${backward_srcdir}/hash_fun.h \
+       ${backward_srcdir}/hashtable.h \
        ${backward_srcdir}/backward_warning.h
 
 pb_srcdir = ${glibcxx_srcdir}/include/ext/pb_ds
@@ -496,7 +466,6 @@ pb_headers7 = \
        ${pb_srcdir}/detail/unordered_iterator/point_iterator.hpp 
 
 
-
 ext_srcdir = ${glibcxx_srcdir}/include/ext
 ext_builddir = ./ext 
 ext_headers = \
@@ -511,10 +480,6 @@ ext_headers = \
        ${ext_srcdir}/stdio_filebuf.h \
        ${ext_srcdir}/stdio_sync_filebuf.h \
        ${ext_srcdir}/functional \
-       ${ext_srcdir}/hash_map \
-       ${ext_srcdir}/hash_set \
-       ${ext_srcdir}/hash_fun.h \
-       ${ext_srcdir}/hashtable.h \
        ${ext_srcdir}/iterator \
        ${ext_srcdir}/malloc_allocator.h \
        ${ext_srcdir}/memory \
@@ -711,18 +676,13 @@ debug_headers = \
        ${debug_srcdir}/deque \
        ${debug_srcdir}/formatter.h \
        ${debug_srcdir}/functions.h \
-       ${debug_srcdir}/hash_map \
-       ${debug_srcdir}/hash_map.h \
-       ${debug_srcdir}/hash_multimap.h \
-       ${debug_srcdir}/hash_multiset.h \
-       ${debug_srcdir}/hash_set \
-       ${debug_srcdir}/hash_set.h \
        ${debug_srcdir}/list \
        ${debug_srcdir}/map \
        ${debug_srcdir}/macros.h \
        ${debug_srcdir}/map.h \
        ${debug_srcdir}/multimap.h \
        ${debug_srcdir}/multiset.h \
+       ${debug_srcdir}/safe_association.h \
        ${debug_srcdir}/safe_base.h \
        ${debug_srcdir}/safe_iterator.h \
        ${debug_srcdir}/safe_iterator.tcc \
@@ -730,6 +690,8 @@ debug_headers = \
        ${debug_srcdir}/set \
        ${debug_srcdir}/set.h \
        ${debug_srcdir}/string \
+       ${debug_srcdir}/unordered_map \
+       ${debug_srcdir}/unordered_set \
        ${debug_srcdir}/vector
 
 # Parallel mode headers
index d1db21d550947cd487eeb29cff517c6079f0e22b..c4a65c51f033b0dbc903255ed4453d5093b1938c 100644 (file)
@@ -394,41 +394,11 @@ bits_headers = \
 backward_srcdir = ${glibcxx_srcdir}/include/backward
 backward_builddir = ./backward
 backward_headers = \
-       ${backward_srcdir}/complex.h \
-       ${backward_srcdir}/iomanip.h \
-       ${backward_srcdir}/istream.h \
-       ${backward_srcdir}/ostream.h \
-       ${backward_srcdir}/stream.h \
-       ${backward_srcdir}/streambuf.h \
-       ${backward_srcdir}/algo.h \
-       ${backward_srcdir}/algobase.h \
-       ${backward_srcdir}/alloc.h \
-       ${backward_srcdir}/bvector.h \
-       ${backward_srcdir}/defalloc.h \
-       ${backward_srcdir}/deque.h \
-       ${backward_srcdir}/function.h \
-       ${backward_srcdir}/hash_map.h \
-       ${backward_srcdir}/hash_set.h \
-       ${backward_srcdir}/hashtable.h \
-       ${backward_srcdir}/heap.h \
-       ${backward_srcdir}/iostream.h \
-       ${backward_srcdir}/iterator.h \
-       ${backward_srcdir}/list.h \
-       ${backward_srcdir}/map.h \
-       ${backward_srcdir}/multimap.h \
-       ${backward_srcdir}/new.h \
-       ${backward_srcdir}/multiset.h \
-       ${backward_srcdir}/pair.h \
-       ${backward_srcdir}/queue.h \
-       ${backward_srcdir}/rope.h \
-       ${backward_srcdir}/set.h \
-       ${backward_srcdir}/slist.h \
-       ${backward_srcdir}/stack.h \
-       ${backward_srcdir}/tempbuf.h \
-       ${backward_srcdir}/tree.h \
-       ${backward_srcdir}/vector.h \
-       ${backward_srcdir}/fstream.h \
        ${backward_srcdir}/strstream \
+       ${backward_srcdir}/hash_map \
+       ${backward_srcdir}/hash_set \
+       ${backward_srcdir}/hash_fun.h \
+       ${backward_srcdir}/hashtable.h \
        ${backward_srcdir}/backward_warning.h
 
 pb_srcdir = ${glibcxx_srcdir}/include/ext/pb_ds
@@ -757,10 +727,6 @@ ext_headers = \
        ${ext_srcdir}/stdio_filebuf.h \
        ${ext_srcdir}/stdio_sync_filebuf.h \
        ${ext_srcdir}/functional \
-       ${ext_srcdir}/hash_map \
-       ${ext_srcdir}/hash_set \
-       ${ext_srcdir}/hash_fun.h \
-       ${ext_srcdir}/hashtable.h \
        ${ext_srcdir}/iterator \
        ${ext_srcdir}/malloc_allocator.h \
        ${ext_srcdir}/memory \
@@ -949,18 +915,13 @@ debug_headers = \
        ${debug_srcdir}/deque \
        ${debug_srcdir}/formatter.h \
        ${debug_srcdir}/functions.h \
-       ${debug_srcdir}/hash_map \
-       ${debug_srcdir}/hash_map.h \
-       ${debug_srcdir}/hash_multimap.h \
-       ${debug_srcdir}/hash_multiset.h \
-       ${debug_srcdir}/hash_set \
-       ${debug_srcdir}/hash_set.h \
        ${debug_srcdir}/list \
        ${debug_srcdir}/map \
        ${debug_srcdir}/macros.h \
        ${debug_srcdir}/map.h \
        ${debug_srcdir}/multimap.h \
        ${debug_srcdir}/multiset.h \
+       ${debug_srcdir}/safe_association.h \
        ${debug_srcdir}/safe_base.h \
        ${debug_srcdir}/safe_iterator.h \
        ${debug_srcdir}/safe_iterator.tcc \
@@ -968,6 +929,8 @@ debug_headers = \
        ${debug_srcdir}/set \
        ${debug_srcdir}/set.h \
        ${debug_srcdir}/string \
+       ${debug_srcdir}/unordered_map \
+       ${debug_srcdir}/unordered_set \
        ${debug_srcdir}/vector
 
 
diff --git a/libstdc++-v3/include/backward/algo.h b/libstdc++-v3/include/backward/algo.h
deleted file mode 100644 (file)
index 2474601..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGO_H
-#define _BACKWARD_ALGO_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "tempbuf.h"
-#include "iterator.h"
-#include <bits/stl_algo.h>
-#include <bits/stl_numeric.h>
-#include <ext/algorithm>
-#include <ext/numeric>
-
-// Names from <stl_algo.h>
-using std::for_each;
-using std::find;
-using std::find_if;
-using std::adjacent_find;
-using std::count;
-using std::count_if;
-using std::search;
-using std::search_n;
-using std::swap_ranges;
-using std::transform;
-using std::replace;
-using std::replace_if;
-using std::replace_copy;
-using std::replace_copy_if;
-using std::generate;
-using std::generate_n;
-using std::remove;
-using std::remove_if;
-using std::remove_copy;
-using std::remove_copy_if;
-using std::unique;
-using std::unique_copy;
-using std::reverse;
-using std::reverse_copy;
-using std::rotate;
-using std::rotate_copy;
-using std::random_shuffle;
-using std::partition;
-using std::stable_partition;
-using std::sort;
-using std::stable_sort;
-using std::partial_sort;
-using std::partial_sort_copy;
-using std::nth_element;
-using std::lower_bound;
-using std::upper_bound;
-using std::equal_range;
-using std::binary_search;
-using std::merge;
-using std::inplace_merge;
-using std::includes;
-using std::set_union;
-using std::set_intersection;
-using std::set_difference;
-using std::set_symmetric_difference;
-using std::min_element;
-using std::max_element;
-using std::next_permutation;
-using std::prev_permutation;
-using std::find_first_of;
-using std::find_end;
-
-// Names from stl_heap.h
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-// Names from stl_numeric.h
-using std::accumulate;
-using std::inner_product;
-using std::partial_sum;
-using std::adjacent_difference;
-
-// Names from ext/algorithm
-using __gnu_cxx::random_sample;
-using __gnu_cxx::random_sample_n;
-using __gnu_cxx::is_sorted;
-using __gnu_cxx::is_heap;
-using __gnu_cxx::count;   // Extension returning void
-using __gnu_cxx::count_if;   // Extension returning void
-
-// Names from ext/numeric
-using __gnu_cxx::power;
-using __gnu_cxx::iota;
-
-#endif /* _BACKWARD_ALGO_H */
diff --git a/libstdc++-v3/include/backward/algobase.h b/libstdc++-v3/include/backward/algobase.h
deleted file mode 100644 (file)
index 289e988..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGOBASE_H
-#define _BACKWARD_ALGOBASE_H 1
-
-#include "backward_warning.h"
-#include "pair.h"
-#include "iterator.h"
-#include <bits/stl_algobase.h>
-#include <bits/stl_uninitialized.h>
-#include <ext/algorithm>
-#include <ext/memory>
-
-// Names from stl_algobase.h
-using std::iter_swap;
-using std::swap;
-using std::min;
-using std::max;
-using std::copy;
-using std::copy_backward;
-using std::fill;
-using std::fill_n;
-using std::mismatch;
-using std::equal;
-using std::lexicographical_compare;
-
-// Names from stl_uninitialized.h
-using std::uninitialized_copy;
-using std::uninitialized_fill;
-using std::uninitialized_fill_n;
-
-// Names from ext/algorithm
-using __gnu_cxx::copy_n;
-using __gnu_cxx::lexicographical_compare_3way;
-
-// Names from ext/memory
-using __gnu_cxx::uninitialized_copy_n;
-
-#endif /* _BACKWARD_ALGOBASE_H */
diff --git a/libstdc++-v3/include/backward/alloc.h b/libstdc++-v3/include/backward/alloc.h
deleted file mode 100644 (file)
index 40a0af1..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2003, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996-1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALLOC_H
-#define _BACKWARD_ALLOC_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/allocator.h>
-
-using std::allocator;
-
-#endif
index 80eabfe878cfb10872ee28ec673f6c05a4efc404..5954bd029535621529ecfbbc7515d9412592c7a6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2007 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
 
 #ifdef __DEPRECATED
 #warning This file includes at least one deprecated or antiquated header. \
-Please consider using one of the 32 headers found in section 17.4.1.2 of the \
-C++ standard. Examples include substituting the <X> header for the <X.h> \
-header for C++ includes, or <iostream> instead of the deprecated header \
-<iostream.h>. To disable this warning use -Wno-deprecated.
+  Please consider the use of alternate interfaces as follows: \
+  <sstream>            basic_stringbuf         <strstream>     strstreambuf \
+  <sstream>            basic_istringstream     <strstream>     istrstream \
+  <sstream>            basic_ostringstream     <strstream>     ostrstream \
+  <sstream>            basic_stringstream      <strstream>     strstream \
+  <unordered_set>      unordered_set           <ext/hash_set>  hash_set \
+  <unordered_set>      unordered_multiset      <ext/hash_set>  hash_multiset \
+  <unordered_map>      unordered_map           <ext/hash_set>  hash_map \
+  <unordered_map>      unordered_multimap      <ext/hash_set>  hash_multimap \
+  To disable this warning use -Wno-deprecated.
 #endif
 
 #endif
diff --git a/libstdc++-v3/include/backward/bvector.h b/libstdc++-v3/include/backward/bvector.h
deleted file mode 100644 (file)
index 9a2c44d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_BVECTOR_H
-#define _BACKWARD_BVECTOR_H 1
-
-#include "backward_warning.h"
-#include <vector>
-
-typedef std::vector<bool, std::allocator<bool> > bit_vector;
-
-#endif /* _BACKWARD_BVECTOR_H */
diff --git a/libstdc++-v3/include/backward/complex.h b/libstdc++-v3/include/backward/complex.h
deleted file mode 100644 (file)
index 7972cf7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_COMPLEX_H
-#define _BACKWARD_COMPLEX_H 1
-
-#include "backward_warning.h"
-#include <complex>
-
-using std::complex;
-typedef complex<float>         float_complex;
-typedef complex<double>                double_complex;
-typedef complex<long double>   long_double_complex;
-
-#endif
diff --git a/libstdc++-v3/include/backward/defalloc.h b/libstdc++-v3/include/backward/defalloc.h
deleted file mode 100644 (file)
index ffa9b16..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-// Inclusion of this file is DEPRECATED.  This is the original HP
-// default allocator.  It is provided only for backward compatibility.
-// This file WILL BE REMOVED in a future release.
-//
-// DO NOT USE THIS FILE unless you have an old container implementation
-// that requires an allocator with the HP-style interface.
-//
-// Standard-conforming allocators have a very different interface.  The
-// standard default allocator is declared in the header <memory>.
-
-#ifndef _BACKWARD_DEFALLOC_H
-#define _BACKWARD_DEFALLOC_H 1
-
-#include "backward_warning.h"
-#include "new.h"
-#include <stddef.h>
-#include <stdlib.h>
-#include <limits.h>
-#include "iostream.h"
-#include "algobase.h"
-
-
-template <class _Tp>
-inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
-    set_new_handler(0);
-    _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
-    if (__tmp == 0) {
-       cerr << "out of memory" << endl;
-       exit(1);
-    }
-    return __tmp;
-}
-
-
-template <class _Tp>
-inline void deallocate(_Tp* __buffer) {
-    ::operator delete(__buffer);
-}
-
-template <class _Tp>
-class allocator {
-public:
-    typedef _Tp value_type;
-    typedef _Tp* pointer;
-    typedef const _Tp* const_pointer;
-    typedef _Tp& reference;
-    typedef const _Tp& const_reference;
-    typedef size_t size_type;
-    typedef ptrdiff_t difference_type;
-    pointer allocate(size_type __n) {
-       return ::allocate((difference_type)__n, (pointer)0);
-    }
-    void deallocate(pointer __p) { ::deallocate(__p); }
-    pointer address(reference __x) { return (pointer)&__x; }
-    const_pointer const_address(const_reference __x) {
-       return (const_pointer)&__x;
-    }
-    size_type init_page_size() {
-       return max(size_type(1), size_type(4096/sizeof(_Tp)));
-    }
-    size_type max_size() const {
-       return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
-    }
-};
-
-class allocator<void> {
-public:
-    typedef void* pointer;
-};
-
-
-
-#endif /* _BACKWARD_DEFALLOC_H */
diff --git a/libstdc++-v3/include/backward/deque.h b/libstdc++-v3/include/backward/deque.h
deleted file mode 100644 (file)
index a4a6b41..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_DEQUE_H
-#define _BACKWARD_DEQUE_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <deque>
-
-using std::deque;
-
-#endif /* _BACKWARD_DEQUE_H */
diff --git a/libstdc++-v3/include/backward/fstream.h b/libstdc++-v3/include/backward/fstream.h
deleted file mode 100644 (file)
index 92835f9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_FSTREAM_H
-#define _BACKWARD_FSTREAM_H 1
-
-#include "backward_warning.h"
-#include <fstream>
-
-using std::filebuf;
-using std::ifstream;
-using std::ofstream;
-using std::fstream;
-using std::streampos;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wfilebuf;
-using std::wifstream;
-using std::wofstream;
-using std::wfstream;
-using std::wstreampos;
-#endif
-
-#endif
diff --git a/libstdc++-v3/include/backward/function.h b/libstdc++-v3/include/backward/function.h
deleted file mode 100644 (file)
index b5be371..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_FUNCTION_H
-#define _BACKWARD_FUNCTION_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <stddef.h>
-#include <bits/stl_function.h>
-#include <ext/functional>
-
-// Names from stl_function.h
-using std::unary_function;
-using std::binary_function;
-using std::plus;
-using std::minus;
-using std::multiplies;
-using std::divides;
-using std::modulus;
-using std::negate;
-using std::equal_to;
-using std::not_equal_to;
-using std::greater;
-using std::less;
-using std::greater_equal;
-using std::less_equal;
-using std::logical_and;
-using std::logical_or;
-using std::logical_not;
-using std::unary_negate;
-using std::binary_negate;
-using std::not1;
-using std::not2;
-using std::binder1st;
-using std::binder2nd;
-using std::bind1st;
-using std::bind2nd;
-using std::pointer_to_unary_function;
-using std::pointer_to_binary_function;
-using std::ptr_fun;
-using std::mem_fun_t;
-using std::const_mem_fun_t;
-using std::mem_fun_ref_t;
-using std::const_mem_fun_ref_t;
-using std::mem_fun1_t;
-using std::const_mem_fun1_t;
-using std::mem_fun1_ref_t;
-using std::const_mem_fun1_ref_t;
-using std::mem_fun;
-using std::mem_fun_ref;
-
-// Names from ext/functional
-using __gnu_cxx::identity_element;
-using __gnu_cxx::unary_compose;
-using __gnu_cxx::binary_compose;
-using __gnu_cxx::compose1;
-using __gnu_cxx::compose2;
-using __gnu_cxx::identity;
-using __gnu_cxx::select1st;
-using __gnu_cxx::select2nd;
-using __gnu_cxx::project1st;
-using __gnu_cxx::project2nd;
-using __gnu_cxx::constant_void_fun;
-using __gnu_cxx::constant_unary_fun;
-using __gnu_cxx::constant_binary_fun;
-using __gnu_cxx::constant0;
-using __gnu_cxx::constant1;
-using __gnu_cxx::constant2;
-using __gnu_cxx::subtractive_rng;
-using __gnu_cxx::mem_fun1;
-using __gnu_cxx::mem_fun1_ref;
-
-#endif /* _BACKWARD_FUNCTION_H */
similarity index 99%
rename from libstdc++-v3/include/ext/hash_fun.h
rename to libstdc++-v3/include/backward/hash_fun.h
index 16c045807547427f9678ce88c2157582c1d6d31f..e6771d77e28a2258dc5276357ed250fc322ff38f 100644 (file)
@@ -53,7 +53,7 @@
  *
  */
 
-/** @file ext/hash_fun.h
+/** @file backward/hash_fun.h
  *  This file is a GNU extension to the Standard C++ Library (possibly
  *  containing extensions from the HP/SGI STL subset).
  */
similarity index 98%
rename from libstdc++-v3/include/ext/hash_map
rename to libstdc++-v3/include/backward/hash_map
index b2d937f277a896672cf492916c9d9040b3ffceff..6b10cda6e3f2849ceb4ae7309026e441734caa46 100644 (file)
@@ -53,7 +53,7 @@
  *
  */
 
-/** @file ext/hash_map
+/** @file backward/hash_map
  *  This file is a GNU extension to the Standard C++ Library (possibly
  *  containing extensions from the HP/SGI STL subset).
  */
 #ifndef _HASH_MAP
 #define _HASH_MAP 1
 
+#include "backward_warning.h"
 #include <bits/c++config.h>
-#include <ext/hashtable.h>
+#include <backward/hashtable.h>
 #include <bits/concept_check.h>
 
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT_D)
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
   using std::equal_to;
   using std::allocator;
@@ -497,11 +498,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT_D)
         hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
     { __hm1.swap(__hm2); }
 
-_GLIBCXX_END_NESTED_NAMESPACE
-
-#ifdef _GLIBCXX_DEBUG
-# include <debug/hash_map>
-#endif
+_GLIBCXX_END_NAMESPACE
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
diff --git a/libstdc++-v3/include/backward/hash_map.h b/libstdc++-v3/include/backward/hash_map.h
deleted file mode 100644 (file)
index aa14522..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_MAP_H
-#define _BACKWARD_HASH_MAP_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include <ext/hash_map>
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_map;
-using __gnu_cxx::hash_multimap;
-
-#endif /* _BACKWARD_HASH_MAP_H */
similarity index 98%
rename from libstdc++-v3/include/ext/hash_set
rename to libstdc++-v3/include/backward/hash_set
index 79d605fa9558747efd29213d632f04501af75123..59c88c9e30a04cdca9d00e2928ab673ba0828843 100644 (file)
@@ -53,7 +53,7 @@
  *
  */
 
-/** @file ext/hash_set
+/** @file backward/hash_set
  *  This file is a GNU extension to the Standard C++ Library (possibly
  *  containing extensions from the HP/SGI STL subset).
  */
 #ifndef _HASH_SET
 #define _HASH_SET 1
 
+#include "backward_warning.h"
 #include <bits/c++config.h>
-#include <ext/hashtable.h>
+#include <backward/hashtable.h>
 #include <bits/concept_check.h>
 
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT_D)
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
 
   using std::equal_to;
   using std::allocator;
@@ -465,11 +466,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT_D)
         hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
     { __hs1.swap(__hs2); }
 
-_GLIBCXX_END_NESTED_NAMESPACE
-
-#ifdef _GLIBCXX_DEBUG
-# include <debug/hash_set>
-#endif
+_GLIBCXX_END_NAMESPACE
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
diff --git a/libstdc++-v3/include/backward/hash_set.h b/libstdc++-v3/include/backward/hash_set.h
deleted file mode 100644 (file)
index c2c6e39..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_SET_H
-#define _BACKWARD_HASH_SET_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include <ext/hash_set>
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_set;
-using __gnu_cxx::hash_multiset;
-
-#endif /* _BACKWARD_HASH_SET_H */
-
index 7b7511b832cb203bc8caa54738a98758fb02718c..7efb8ea5b128f42e82e69a90aa32fcb3deb8df10 100644 (file)
@@ -1,6 +1,7 @@
-// Backward-compat support -*- C++ -*-
+// Hashtable implementation used by containers -*- C++ -*-
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
  *
  */
 
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
+/** @file backward/hashtable.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).
  */
 
-#ifndef _BACKWARD_HASHTABLE_H
-#define _BACKWARD_HASHTABLE_H 1
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
 
-#include "backward_warning.h"
-#include <ext/hashtable.h>
-#include "algo.h"
-#include "alloc.h"
-#include "vector.h"
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
 
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <bits/stl_function.h>
+#include <backward/hash_fun.h>
 
-#endif /* _BACKWARD_HASHTABLE_H */
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+  using std::size_t;
+  using std::ptrdiff_t;
+  using std::forward_iterator_tag;
+  using std::input_iterator_tag;
+  using std::_Construct;
+  using std::_Destroy;
+  using std::distance;
+  using std::vector;
+  using std::pair;
+  using std::__iterator_category;
+
+  template<class _Val>
+    struct _Hashtable_node
+    {
+      _Hashtable_node* _M_next;
+      _Val _M_val;
+    };
+
+  template<class _Val, class _Key, class _HashFcn, class _ExtractKey, 
+          class _EqualKey, class _Alloc = std::allocator<_Val> >
+    class hashtable;
+
+  template<class _Val, class _Key, class _HashFcn,
+          class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_iterator;
+
+  template<class _Val, class _Key, class _HashFcn,
+          class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_const_iterator;
+
+  template<class _Val, class _Key, class _HashFcn,
+          class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_iterator
+    {
+      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+        _Hashtable;
+      typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
+                                 _ExtractKey, _EqualKey, _Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+                                       _ExtractKey, _EqualKey, _Alloc>
+        const_iterator;
+      typedef _Hashtable_node<_Val> _Node;
+      typedef forward_iterator_tag iterator_category;
+      typedef _Val value_type;
+      typedef ptrdiff_t difference_type;
+      typedef size_t size_type;
+      typedef _Val& reference;
+      typedef _Val* pointer;
+      
+      _Node* _M_cur;
+      _Hashtable* _M_ht;
+
+      _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
+      : _M_cur(__n), _M_ht(__tab) { }
+
+      _Hashtable_iterator() { }
+
+      reference
+      operator*() const
+      { return _M_cur->_M_val; }
+
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      iterator&
+      operator++();
+
+      iterator
+      operator++(int);
+
+      bool
+      operator==(const iterator& __it) const
+      { return _M_cur == __it._M_cur; }
+
+      bool
+      operator!=(const iterator& __it) const
+      { return _M_cur != __it._M_cur; }
+    };
+
+  template<class _Val, class _Key, class _HashFcn,
+          class _ExtractKey, class _EqualKey, class _Alloc>
+    struct _Hashtable_const_iterator
+    {
+      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+        _Hashtable;
+      typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
+                                 _ExtractKey,_EqualKey,_Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+                                       _ExtractKey, _EqualKey, _Alloc>
+        const_iterator;
+      typedef _Hashtable_node<_Val> _Node;
+
+      typedef forward_iterator_tag iterator_category;
+      typedef _Val value_type;
+      typedef ptrdiff_t difference_type;
+      typedef size_t size_type;
+      typedef const _Val& reference;
+      typedef const _Val* pointer;
+      
+      const _Node* _M_cur;
+      const _Hashtable* _M_ht;
+
+      _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+      : _M_cur(__n), _M_ht(__tab) { }
+
+      _Hashtable_const_iterator() { }
+
+      _Hashtable_const_iterator(const iterator& __it)
+      : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
+
+      reference
+      operator*() const
+      { return _M_cur->_M_val; }
+
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      const_iterator&
+      operator++();
+
+      const_iterator
+      operator++(int);
+
+      bool
+      operator==(const const_iterator& __it) const
+      { return _M_cur == __it._M_cur; }
+
+      bool
+      operator!=(const const_iterator& __it) const
+      { return _M_cur != __it._M_cur; }
+    };
+
+  // Note: assumes long is at least 32 bits.
+  enum { _S_num_primes = 28 };
+
+  static const unsigned long __stl_prime_list[_S_num_primes] =
+    {
+      53ul,         97ul,         193ul,       389ul,       769ul,
+      1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
+      49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
+      1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
+      50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,
+      1610612741ul, 3221225473ul, 4294967291ul
+    };
+
+  inline unsigned long
+  __stl_next_prime(unsigned long __n)
+  {
+    const unsigned long* __first = __stl_prime_list;
+    const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+    const unsigned long* pos = std::lower_bound(__first, __last, __n);
+    return pos == __last ? *(__last - 1) : *pos;
+  }
+
+  // Forward declaration of operator==.  
+  template<class _Val, class _Key, class _HF, class _Ex,
+          class _Eq, class _All>
+    class hashtable;
+
+  template<class _Val, class _Key, class _HF, class _Ex,
+          class _Eq, class _All>
+    bool
+    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
+
+  // Hashtables handle allocators a bit differently than other
+  // containers do.  If we're using standard-conforming allocators, then
+  // a hashtable unconditionally has a member variable to hold its
+  // allocator, even if it so happens that all instances of the
+  // allocator type are identical.  This is because, for hashtables,
+  // this extra storage is negligible.  Additionally, a base class
+  // wouldn't serve any other purposes; it wouldn't, for example,
+  // simplify the exception-handling code.  
+  template<class _Val, class _Key, class _HashFcn,
+          class _ExtractKey, class _EqualKey, class _Alloc>
+    class hashtable
+    {
+    public:
+      typedef _Key key_type;
+      typedef _Val value_type;
+      typedef _HashFcn hasher;
+      typedef _EqualKey key_equal;
+
+      typedef size_t            size_type;
+      typedef ptrdiff_t         difference_type;
+      typedef value_type*       pointer;
+      typedef const value_type* const_pointer;
+      typedef value_type&       reference;
+      typedef const value_type& const_reference;
+
+      hasher
+      hash_funct() const
+      { return _M_hash; }
+
+      key_equal
+      key_eq() const
+      { return _M_equals; }
+
+    private:
+      typedef _Hashtable_node<_Val> _Node;
+
+    public:
+      typedef typename _Alloc::template rebind<value_type>::other allocator_type;
+      allocator_type
+      get_allocator() const
+      { return _M_node_allocator; }
+
+    private:
+      typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+      typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+      typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+
+      _Node_Alloc _M_node_allocator;
+
+      _Node*
+      _M_get_node()
+      { return _M_node_allocator.allocate(1); }
+
+      void
+      _M_put_node(_Node* __p)
+      { _M_node_allocator.deallocate(__p, 1); }
+
+    private:
+      hasher                _M_hash;
+      key_equal             _M_equals;
+      _ExtractKey           _M_get_key;
+      _Vector_type          _M_buckets;
+      size_type             _M_num_elements;
+      
+    public:
+      typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+                                 _EqualKey, _Alloc>
+        iterator;
+      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+                                       _EqualKey, _Alloc>
+        const_iterator;
+
+      friend struct
+      _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
+
+      friend struct
+      _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+                               _EqualKey, _Alloc>;
+
+    public:
+      hashtable(size_type __n, const _HashFcn& __hf,
+               const _EqualKey& __eql, const _ExtractKey& __ext,
+               const allocator_type& __a = allocator_type())
+      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+       _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
+      { _M_initialize_buckets(__n); }
+
+      hashtable(size_type __n, const _HashFcn& __hf,
+               const _EqualKey& __eql,
+               const allocator_type& __a = allocator_type())
+      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+       _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
+      { _M_initialize_buckets(__n); }
+
+      hashtable(const hashtable& __ht)
+      : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
+      _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
+      _M_buckets(__ht.get_allocator()), _M_num_elements(0)
+      { _M_copy_from(__ht); }
+
+      hashtable&
+      operator= (const hashtable& __ht)
+      {
+       if (&__ht != this)
+         {
+           clear();
+           _M_hash = __ht._M_hash;
+           _M_equals = __ht._M_equals;
+           _M_get_key = __ht._M_get_key;
+           _M_copy_from(__ht);
+         }
+       return *this;
+      }
+
+      ~hashtable()
+      { clear(); }
+
+      size_type
+      size() const
+      { return _M_num_elements; }
+
+      size_type
+      max_size() const
+      { return size_type(-1); }
+
+      bool
+      empty() const
+      { return size() == 0; }
+
+      void
+      swap(hashtable& __ht)
+      {
+       std::swap(_M_hash, __ht._M_hash);
+       std::swap(_M_equals, __ht._M_equals);
+       std::swap(_M_get_key, __ht._M_get_key);
+       _M_buckets.swap(__ht._M_buckets);
+       std::swap(_M_num_elements, __ht._M_num_elements);
+      }
+
+      iterator
+      begin()
+      {
+       for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+         if (_M_buckets[__n])
+           return iterator(_M_buckets[__n], this);
+       return end();
+      }
+
+      iterator
+      end()
+      { return iterator(0, this); }
+
+      const_iterator
+      begin() const
+      {
+       for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+         if (_M_buckets[__n])
+           return const_iterator(_M_buckets[__n], this);
+       return end();
+      }
+
+      const_iterator
+      end() const
+      { return const_iterator(0, this); }
+
+      template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
+               class _Al>
+        friend bool
+        operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+                  const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+
+    public:
+      size_type
+      bucket_count() const
+      { return _M_buckets.size(); }
+
+      size_type
+      max_bucket_count() const
+      { return __stl_prime_list[(int)_S_num_primes - 1]; }
+
+      size_type
+      elems_in_bucket(size_type __bucket) const
+      {
+       size_type __result = 0;
+       for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
+         __result += 1;
+       return __result;
+      }
+
+      pair<iterator, bool>
+      insert_unique(const value_type& __obj)
+      {
+       resize(_M_num_elements + 1);
+       return insert_unique_noresize(__obj);
+      }
+
+      iterator
+      insert_equal(const value_type& __obj)
+      {
+       resize(_M_num_elements + 1);
+       return insert_equal_noresize(__obj);
+      }
+
+      pair<iterator, bool>
+      insert_unique_noresize(const value_type& __obj);
+
+      iterator
+      insert_equal_noresize(const value_type& __obj);
+
+      template<class _InputIterator>
+        void
+        insert_unique(_InputIterator __f, _InputIterator __l)
+        { insert_unique(__f, __l, __iterator_category(__f)); }
+
+      template<class _InputIterator>
+        void
+        insert_equal(_InputIterator __f, _InputIterator __l)
+        { insert_equal(__f, __l, __iterator_category(__f)); }
+
+      template<class _InputIterator>
+        void
+        insert_unique(_InputIterator __f, _InputIterator __l,
+                     input_iterator_tag)
+        {
+         for ( ; __f != __l; ++__f)
+           insert_unique(*__f);
+       }
+
+      template<class _InputIterator>
+        void
+        insert_equal(_InputIterator __f, _InputIterator __l,
+                    input_iterator_tag)
+        {
+         for ( ; __f != __l; ++__f)
+           insert_equal(*__f);
+       }
+
+      template<class _ForwardIterator>
+        void
+        insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+                     forward_iterator_tag)
+        {
+         size_type __n = distance(__f, __l);
+         resize(_M_num_elements + __n);
+         for ( ; __n > 0; --__n, ++__f)
+           insert_unique_noresize(*__f);
+       }
+
+      template<class _ForwardIterator>
+        void
+        insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+                    forward_iterator_tag)
+        {
+         size_type __n = distance(__f, __l);
+         resize(_M_num_elements + __n);
+         for ( ; __n > 0; --__n, ++__f)
+           insert_equal_noresize(*__f);
+       }
+
+      reference
+      find_or_insert(const value_type& __obj);
+
+      iterator
+      find(const key_type& __key)
+      {
+       size_type __n = _M_bkt_num_key(__key);
+       _Node* __first;
+       for (__first = _M_buckets[__n];
+            __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+            __first = __first->_M_next)
+         { }
+       return iterator(__first, this);
+      }
+
+      const_iterator
+      find(const key_type& __key) const
+      {
+       size_type __n = _M_bkt_num_key(__key);
+       const _Node* __first;
+       for (__first = _M_buckets[__n];
+            __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+            __first = __first->_M_next)
+         { }
+       return const_iterator(__first, this);
+      }
+
+      size_type
+      count(const key_type& __key) const
+      {
+       const size_type __n = _M_bkt_num_key(__key);
+       size_type __result = 0;
+       
+       for (const _Node* __cur = _M_buckets[__n]; __cur;
+            __cur = __cur->_M_next)
+         if (_M_equals(_M_get_key(__cur->_M_val), __key))
+           ++__result;
+       return __result;
+      }
+
+      pair<iterator, iterator>
+      equal_range(const key_type& __key);
+
+      pair<const_iterator, const_iterator>
+      equal_range(const key_type& __key) const;
+
+      size_type
+      erase(const key_type& __key);
+      
+      void
+      erase(const iterator& __it);
+
+      void
+      erase(iterator __first, iterator __last);
+
+      void
+      erase(const const_iterator& __it);
+
+      void
+      erase(const_iterator __first, const_iterator __last);
+
+      void
+      resize(size_type __num_elements_hint);
+
+      void
+      clear();
+
+    private:
+      size_type
+      _M_next_size(size_type __n) const
+      { return __stl_next_prime(__n); }
+
+      void
+      _M_initialize_buckets(size_type __n)
+      {
+       const size_type __n_buckets = _M_next_size(__n);
+       _M_buckets.reserve(__n_buckets);
+       _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+       _M_num_elements = 0;
+      }
+
+      size_type
+      _M_bkt_num_key(const key_type& __key) const
+      { return _M_bkt_num_key(__key, _M_buckets.size()); }
+
+      size_type
+      _M_bkt_num(const value_type& __obj) const
+      { return _M_bkt_num_key(_M_get_key(__obj)); }
+
+      size_type
+      _M_bkt_num_key(const key_type& __key, size_t __n) const
+      { return _M_hash(__key) % __n; }
+
+      size_type
+      _M_bkt_num(const value_type& __obj, size_t __n) const
+      { return _M_bkt_num_key(_M_get_key(__obj), __n); }
+
+      _Node*
+      _M_new_node(const value_type& __obj)
+      {
+       _Node* __n = _M_get_node();
+       __n->_M_next = 0;
+       try
+         {
+           this->get_allocator().construct(&__n->_M_val, __obj);
+           return __n;
+         }
+       catch(...)
+         {
+           _M_put_node(__n);
+           __throw_exception_again;
+         }
+      }
+
+      void
+      _M_delete_node(_Node* __n)
+      {
+       this->get_allocator().destroy(&__n->_M_val);
+       _M_put_node(__n);
+      }
+      
+      void
+      _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+
+      void
+      _M_erase_bucket(const size_type __n, _Node* __last);
+
+      void
+      _M_copy_from(const hashtable& __ht);
+    };
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+           class _All>
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++()
+    {
+      const _Node* __old = _M_cur;
+      _M_cur = _M_cur->_M_next;
+      if (!_M_cur)
+       {
+         size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+         while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+           _M_cur = _M_ht->_M_buckets[__bucket];
+       }
+      return *this;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+           class _All>
+    inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++(int)
+    {
+      iterator __tmp = *this;
+      ++*this;
+      return __tmp;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+           class _All>
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++()
+    {
+      const _Node* __old = _M_cur;
+      _M_cur = _M_cur->_M_next;
+      if (!_M_cur)
+       {
+         size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+         while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+           _M_cur = _M_ht->_M_buckets[__bucket];
+       }
+      return *this;
+    }
+
+  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+           class _All>
+    inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+    operator++(int)
+    {
+      const_iterator __tmp = *this;
+      ++*this;
+      return __tmp;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    bool
+    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+    {
+      typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
+
+      if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+       return false;
+
+      for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
+       {
+         _Node* __cur1 = __ht1._M_buckets[__n];
+         _Node* __cur2 = __ht2._M_buckets[__n];
+         // Check same length of lists
+         for (; __cur1 && __cur2;
+              __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+           { } 
+         if (__cur1 || __cur2)
+           return false;
+         // Now check one's elements are in the other
+         for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
+              __cur1 = __cur1->_M_next)
+           {
+             bool _found__cur1 = false;
+             for (__cur2 = __ht2._M_buckets[__n];
+                  __cur2; __cur2 = __cur2->_M_next)
+               {
+                 if (__cur1->_M_val == __cur2->_M_val)
+                   {
+                     _found__cur1 = true;
+                     break;
+                   }
+               }
+             if (!_found__cur1)
+               return false;
+           }
+       }
+      return true;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline bool
+    operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+    { return !(__ht1 == __ht2); }
+
+  template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
+           class _All>
+    inline void
+    swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+        hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
+    { __ht1.swap(__ht2); }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    insert_unique_noresize(const value_type& __obj)
+    {
+      const size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+         return pair<iterator, bool>(iterator(__cur, this), false);
+      
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return pair<iterator, bool>(iterator(__tmp, this), true);
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    insert_equal_noresize(const value_type& __obj)
+    {
+      const size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+         {
+           _Node* __tmp = _M_new_node(__obj);
+           __tmp->_M_next = __cur->_M_next;
+           __cur->_M_next = __tmp;
+           ++_M_num_elements;
+           return iterator(__tmp, this);
+         }
+
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return iterator(__tmp, this);
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    find_or_insert(const value_type& __obj)
+    {
+      resize(_M_num_elements + 1);
+
+      size_type __n = _M_bkt_num(__obj);
+      _Node* __first = _M_buckets[__n];
+      
+      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+         return __cur->_M_val;
+      
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __first;
+      _M_buckets[__n] = __tmp;
+      ++_M_num_elements;
+      return __tmp->_M_val;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
+        typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    equal_range(const key_type& __key)
+    {
+      typedef pair<iterator, iterator> _Pii;
+      const size_type __n = _M_bkt_num_key(__key);
+
+      for (_Node* __first = _M_buckets[__n]; __first;
+          __first = __first->_M_next)
+       if (_M_equals(_M_get_key(__first->_M_val), __key))
+         {
+           for (_Node* __cur = __first->_M_next; __cur;
+                __cur = __cur->_M_next)
+             if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+               return _Pii(iterator(__first, this), iterator(__cur, this));
+           for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+             if (_M_buckets[__m])
+               return _Pii(iterator(__first, this),
+                           iterator(_M_buckets[__m], this));
+           return _Pii(iterator(__first, this), end());
+         }
+      return _Pii(end(), end());
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
+        typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    equal_range(const key_type& __key) const
+    {
+      typedef pair<const_iterator, const_iterator> _Pii;
+      const size_type __n = _M_bkt_num_key(__key);
+
+      for (const _Node* __first = _M_buckets[__n]; __first;
+          __first = __first->_M_next)
+       {
+         if (_M_equals(_M_get_key(__first->_M_val), __key))
+           {
+             for (const _Node* __cur = __first->_M_next; __cur;
+                  __cur = __cur->_M_next)
+               if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+                 return _Pii(const_iterator(__first, this),
+                             const_iterator(__cur, this));
+             for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+               if (_M_buckets[__m])
+                 return _Pii(const_iterator(__first, this),
+                             const_iterator(_M_buckets[__m], this));
+             return _Pii(const_iterator(__first, this), end());
+           }
+       }
+      return _Pii(end(), end());
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const key_type& __key)
+    {
+      const size_type __n = _M_bkt_num_key(__key);
+      _Node* __first = _M_buckets[__n];
+      size_type __erased = 0;
+      
+      if (__first)
+       {
+         _Node* __cur = __first;
+         _Node* __next = __cur->_M_next;
+         while (__next)
+           {
+             if (_M_equals(_M_get_key(__next->_M_val), __key))
+               {
+                 __cur->_M_next = __next->_M_next;
+                 _M_delete_node(__next);
+                 __next = __cur->_M_next;
+                 ++__erased;
+                 --_M_num_elements;
+               }
+             else
+               {
+                 __cur = __next;
+                 __next = __cur->_M_next;
+               }
+           }
+         if (_M_equals(_M_get_key(__first->_M_val), __key))
+           {
+             _M_buckets[__n] = __first->_M_next;
+             _M_delete_node(__first);
+             ++__erased;
+             --_M_num_elements;
+           }
+       }
+      return __erased;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const iterator& __it)
+    {
+      _Node* __p = __it._M_cur;
+      if (__p)
+       {
+         const size_type __n = _M_bkt_num(__p->_M_val);
+         _Node* __cur = _M_buckets[__n];
+         
+         if (__cur == __p)
+           {
+             _M_buckets[__n] = __cur->_M_next;
+             _M_delete_node(__cur);
+             --_M_num_elements;
+           }
+         else
+           {
+             _Node* __next = __cur->_M_next;
+             while (__next)
+               {
+                 if (__next == __p)
+                   {
+                     __cur->_M_next = __next->_M_next;
+                     _M_delete_node(__next);
+                     --_M_num_elements;
+                     break;
+                   }
+                 else
+                   {
+                     __cur = __next;
+                     __next = __cur->_M_next;
+                   }
+               }
+           }
+       }
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(iterator __first, iterator __last)
+    {
+      size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
+                                           : _M_buckets.size();
+
+      size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
+                                          : _M_buckets.size();
+
+      if (__first._M_cur == __last._M_cur)
+       return;
+      else if (__f_bucket == __l_bucket)
+       _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+      else
+       {
+         _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+         for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+           _M_erase_bucket(__n, 0);
+         if (__l_bucket != _M_buckets.size())
+           _M_erase_bucket(__l_bucket, __last._M_cur);
+       }
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const_iterator __first, const_iterator __last)
+    {
+      erase(iterator(const_cast<_Node*>(__first._M_cur),
+                    const_cast<hashtable*>(__first._M_ht)),
+           iterator(const_cast<_Node*>(__last._M_cur),
+                    const_cast<hashtable*>(__last._M_ht)));
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    inline void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    erase(const const_iterator& __it)
+    { erase(iterator(const_cast<_Node*>(__it._M_cur),
+                    const_cast<hashtable*>(__it._M_ht))); }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    resize(size_type __num_elements_hint)
+    {
+      const size_type __old_n = _M_buckets.size();
+      if (__num_elements_hint > __old_n)
+       {
+         const size_type __n = _M_next_size(__num_elements_hint);
+         if (__n > __old_n)
+           {
+             _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
+             try
+               {
+                 for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
+                   {
+                     _Node* __first = _M_buckets[__bucket];
+                     while (__first)
+                       {
+                         size_type __new_bucket = _M_bkt_num(__first->_M_val,
+                                                             __n);
+                         _M_buckets[__bucket] = __first->_M_next;
+                         __first->_M_next = __tmp[__new_bucket];
+                         __tmp[__new_bucket] = __first;
+                         __first = _M_buckets[__bucket];
+                       }
+                   }
+                 _M_buckets.swap(__tmp);
+               }
+             catch(...)
+               {
+                 for (size_type __bucket = 0; __bucket < __tmp.size();
+                      ++__bucket)
+                   {
+                     while (__tmp[__bucket])
+                       {
+                         _Node* __next = __tmp[__bucket]->_M_next;
+                         _M_delete_node(__tmp[__bucket]);
+                         __tmp[__bucket] = __next;
+                       }
+                   }
+                 __throw_exception_again;
+               }
+           }
+       }
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+    {
+      _Node* __cur = _M_buckets[__n];
+      if (__cur == __first)
+       _M_erase_bucket(__n, __last);
+      else
+       {
+         _Node* __next;
+         for (__next = __cur->_M_next;
+              __next != __first;
+              __cur = __next, __next = __cur->_M_next)
+           ;
+         while (__next != __last)
+           {
+             __cur->_M_next = __next->_M_next;
+             _M_delete_node(__next);
+             __next = __cur->_M_next;
+             --_M_num_elements;
+           }
+       }
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_erase_bucket(const size_type __n, _Node* __last)
+    {
+      _Node* __cur = _M_buckets[__n];
+      while (__cur != __last)
+       {
+         _Node* __next = __cur->_M_next;
+         _M_delete_node(__cur);
+         __cur = __next;
+         _M_buckets[__n] = __cur;
+         --_M_num_elements;
+       }
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    clear()
+    {
+      for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
+       {
+         _Node* __cur = _M_buckets[__i];
+         while (__cur != 0)
+           {
+             _Node* __next = __cur->_M_next;
+             _M_delete_node(__cur);
+             __cur = __next;
+           }
+         _M_buckets[__i] = 0;
+       }
+      _M_num_elements = 0;
+    }
+
+  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+    void
+    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+    _M_copy_from(const hashtable& __ht)
+    {
+      _M_buckets.clear();
+      _M_buckets.reserve(__ht._M_buckets.size());
+      _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+      try
+       {
+         for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+           const _Node* __cur = __ht._M_buckets[__i];
+           if (__cur)
+             {
+               _Node* __local_copy = _M_new_node(__cur->_M_val);
+               _M_buckets[__i] = __local_copy;
+               
+               for (_Node* __next = __cur->_M_next;
+                    __next;
+                    __cur = __next, __next = __cur->_M_next)
+                 {
+                   __local_copy->_M_next = _M_new_node(__next->_M_val);
+                   __local_copy = __local_copy->_M_next;
+                 }
+             }
+         }
+         _M_num_elements = __ht._M_num_elements;
+       }
+      catch(...)
+       {
+         clear();
+         __throw_exception_again;
+       }
+    }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/backward/heap.h b/libstdc++-v3/include/backward/heap.h
deleted file mode 100644 (file)
index ef2e684..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_HEAP_H
-#define _BACKWARD_HEAP_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/stl_heap.h>
-
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-#endif /* _BACKWARD_HEAP_H */
diff --git a/libstdc++-v3/include/backward/iomanip.h b/libstdc++-v3/include/backward/iomanip.h
deleted file mode 100644 (file)
index a4099a7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_IOMANIP_H
-#define _BACKWARD_IOMANIP_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-#include <iomanip>
-
-// These are from <ios> as per [27.4].
-using std::boolalpha;
-using std::noboolalpha;
-using std::showbase;
-using std::noshowbase;
-using std::showpoint;
-using std::noshowpoint;
-using std::showpos;
-using std::noshowpos;
-using std::skipws;
-using std::noskipws;
-using std::uppercase;
-using std::nouppercase;
-using std::internal;
-using std::left;
-using std::right;
-using std::dec;
-using std::hex;
-using std::oct;
-using std::fixed;
-using std::scientific;
-
-// These are from <iomanip> as per [27.6].  Manipulators from <istream>
-// and <ostream> (e.g., endl) are made available via <iostream.h>.
-using std::resetiosflags;
-using std::setiosflags;
-using std::setbase;
-using std::setfill;
-using std::setprecision;
-using std::setw;
-
-#endif
diff --git a/libstdc++-v3/include/backward/iostream.h b/libstdc++-v3/include/backward/iostream.h
deleted file mode 100644 (file)
index ed275ff..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (C) 1997-1999, 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_IOSTREAM_H
-#define _BACKWARD_IOSTREAM_H 1
-
-#include "backward_warning.h"
-#include <iostream>
-
-using std::iostream;
-using std::ostream;
-using std::istream;
-using std::ios;
-using std::streambuf;
-
-using std::cout;
-using std::cin;
-using std::cerr;
-using std::clog;
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wcout;
-using std::wcin;
-using std::wcerr;
-using std::wclog;
-#endif
-
-using std::ws;
-using std::endl;
-using std::ends;
-using std::flush;
-
-#endif
diff --git a/libstdc++-v3/include/backward/istream.h b/libstdc++-v3/include/backward/istream.h
deleted file mode 100644 (file)
index b1c55d1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_ISTREAM_H
-#define _BACKWARD_ISTREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/iterator.h b/libstdc++-v3/include/backward/iterator.h
deleted file mode 100644 (file)
index 89496fb..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ITERATOR_H
-#define _BACKWARD_ITERATOR_H 1
-
-#include "backward_warning.h"
-#include "function.h"
-#include <stddef.h>
-#include "iostream.h"
-#include <iterator>
-
-#include <bits/stl_construct.h>
-#include <bits/stl_raw_storage_iter.h>
-
-#include <ext/iterator> // For 3-parameter distance extension
-
-// Names from stl_iterator.h
-using std::input_iterator_tag;
-using std::output_iterator_tag;
-using std::forward_iterator_tag;
-using std::bidirectional_iterator_tag;
-using std::random_access_iterator_tag;
-
-#if 0
-using std::iterator;
-#endif
-
-// The base classes input_iterator, output_iterator, forward_iterator,
-// bidirectional_iterator, and random_access_iterator are not part of
-// the C++ standard.  (They have been replaced by struct iterator.)
-// They are included for backward compatibility with the HP STL.
-template<typename _Tp, typename _Distance>
-  struct input_iterator {
-    typedef input_iterator_tag iterator_category;
-    typedef _Tp                value_type;
-    typedef _Distance          difference_type;
-    typedef _Tp*               pointer;
-    typedef _Tp&               reference;
-  };
-
-struct output_iterator {
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-};
-
-template<typename _Tp, typename _Distance>
-  struct forward_iterator {
-    typedef forward_iterator_tag iterator_category;
-    typedef _Tp                  value_type;
-    typedef _Distance            difference_type;
-    typedef _Tp*                 pointer;
-    typedef _Tp&                 reference;
-  };
-
-template<typename _Tp, typename _Distance>
-  struct bidirectional_iterator {
-    typedef bidirectional_iterator_tag iterator_category;
-    typedef _Tp                        value_type;
-    typedef _Distance                  difference_type;
-    typedef _Tp*                       pointer;
-    typedef _Tp&                       reference;
-  };
-
-template<typename _Tp, typename _Distance>
-  struct random_access_iterator {
-    typedef random_access_iterator_tag iterator_category;
-    typedef _Tp                        value_type;
-    typedef _Distance                  difference_type;
-    typedef _Tp*                       pointer;
-    typedef _Tp&                       reference;
-  };
-
-using std::iterator_traits;
-
-template <class _Iter>
-  inline typename iterator_traits<_Iter>::iterator_category
-  iterator_category(const _Iter& __i)
-  { return __iterator_category(__i); }
-
-template <class _Iter>
-  inline typename iterator_traits<_Iter>::difference_type*
-  distance_type(const _Iter&)
-  { return static_cast<typename iterator_traits<_Iter>::difference_type*>(0); }
-
-template<class _Iter>
-  inline typename iterator_traits<_Iter>::value_type*
-  value_type(const _Iter& __i)
-  { return static_cast<typename iterator_traits<_Iter>::value_type*>(0); }
-
-using std::distance;
-using __gnu_cxx::distance; // 3-parameter extension
-using std::advance;
-
-using std::insert_iterator;
-using std::front_insert_iterator;
-using std::back_insert_iterator;
-using std::inserter;
-using std::front_inserter;
-using std::back_inserter;
-
-using std::reverse_iterator;
-
-using std::istream_iterator;
-using std::ostream_iterator;
-
-// Names from stl_construct.h
-template<class _T1, class _T2>
-  inline void
-  construct(_T1* __p, const _T2& __value)
-  { std::_Construct(__p, __value); }
-
-template<class _T1>
-  inline void
-  construct(_T1* __p)
-  { std::_Construct(__p); }
-
-template <class _Tp>
-  inline void
-  destroy(_Tp* __pointer)
-  { std::_Destroy(__pointer); }
-
-template <class _ForwardIterator>
-  inline void
-  destroy(_ForwardIterator __first, _ForwardIterator __last)
-  { std::_Destroy(__first, __last); }
-
-
-// Names from stl_raw_storage_iter.h
-using std::raw_storage_iterator;
-
-#endif /* _BACKWARD_ITERATOR_H */
diff --git a/libstdc++-v3/include/backward/list.h b/libstdc++-v3/include/backward/list.h
deleted file mode 100644 (file)
index d70a6e4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_LIST_H
-#define _BACKWARD_LIST_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <list>
-
-using std::list;
-
-#endif /* _BACKWARD_LIST_H */
diff --git a/libstdc++-v3/include/backward/map.h b/libstdc++-v3/include/backward/map.h
deleted file mode 100644 (file)
index 2ff3cec..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MAP_H
-#define _BACKWARD_MAP_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <map>
-
-using std::map;
-
-#endif /* _BACKWARD_MAP_H */
diff --git a/libstdc++-v3/include/backward/multimap.h b/libstdc++-v3/include/backward/multimap.h
deleted file mode 100644 (file)
index 515d299..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MULTIMAP_H
-#define _BACKWARD_MULTIMAP_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <map>
-
-using std::multimap;
-
-#endif /* _BACKWARD_MULTIMAP_H */
diff --git a/libstdc++-v3/include/backward/multiset.h b/libstdc++-v3/include/backward/multiset.h
deleted file mode 100644 (file)
index 1f857ae..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MULTISET_H
-#define _BACKWARD_MULTISET_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <set>
-
-using std::multiset;
-
-#endif /* _BACKWARD_MULTISET_H */
diff --git a/libstdc++-v3/include/backward/new.h b/libstdc++-v3/include/backward/new.h
deleted file mode 100644 (file)
index 9cfbab2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*- forwarding header.
-// Copyright (C) 2000 Free Software Foundation
-
-// This file is part of GCC.
-//
-// GCC 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.
-//
-// GCC 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 GCC; see the file COPYING.  If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, 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.
-
-#ifndef _BACKWARD_NEW_H
-#define _BACKWARD_NEW_H 1
-
-#include "backward_warning.h"
-#include <new>
-
-using std::bad_alloc;
-using std::nothrow_t;
-using std::nothrow;
-using std::new_handler;
-using std::set_new_handler;
-
-#endif
diff --git a/libstdc++-v3/include/backward/ostream.h b/libstdc++-v3/include/backward/ostream.h
deleted file mode 100644 (file)
index 07ef9b0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_OSTREAM_H
-#define _BACKWARD_OSTREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/pair.h b/libstdc++-v3/include/backward/pair.h
deleted file mode 100644 (file)
index 4985bcb..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_PAIR_H
-#define _BACKWARD_PAIR_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/stl_pair.h>
-
-using std::pair;
-using std::make_pair;
-
-#endif /* _BACKWARD_PAIR_H */
diff --git a/libstdc++-v3/include/backward/queue.h b/libstdc++-v3/include/backward/queue.h
deleted file mode 100644 (file)
index da7505c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_QUEUE_H
-#define _BACKWARD_QUEUE_H 1
-
-#include "backward_warning.h"
-#include <queue>
-
-using std::queue;
-using std::priority_queue;
-
-#endif
diff --git a/libstdc++-v3/include/backward/rope.h b/libstdc++-v3/include/backward/rope.h
deleted file mode 100644 (file)
index 71e8815..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ROPE_H
-#define _BACKWARD_ROPE_H 1
-
-#include "backward_warning.h"
-#include "hashtable.h"
-#include <ext/rope>
-
-using __gnu_cxx::char_producer;
-using __gnu_cxx::sequence_buffer;
-using __gnu_cxx::rope;
-using __gnu_cxx::crope;
-using __gnu_cxx::wrope;
-
-#endif /* _BACKWARD_ROPE_H */
diff --git a/libstdc++-v3/include/backward/set.h b/libstdc++-v3/include/backward/set.h
deleted file mode 100644 (file)
index 3c6a390..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_SET_H
-#define _BACKWARD_SET_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <set>
-
-using std::set;
-
-#endif /* _BACKWARD_SET_H */
diff --git a/libstdc++-v3/include/backward/slist.h b/libstdc++-v3/include/backward/slist.h
deleted file mode 100644 (file)
index 9b9a43d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_SLIST_H
-#define _BACKWARD_SLIST_H 1
-
-#include "backward_warning.h"
-#include <ext/slist>
-
-using __gnu_cxx::slist;
-
-#endif /* _BACKWARD_SLIST_H */
diff --git a/libstdc++-v3/include/backward/stack.h b/libstdc++-v3/include/backward/stack.h
deleted file mode 100644 (file)
index 07df417..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_STACK_H
-#define _BACKWARD_STACK_H 1
-
-#include "backward_warning.h"
-#include "vector.h"
-#include "deque.h"
-#include "heap.h"
-#include "queue.h"
-#include <stack>
-
-using std::stack;
-
-#endif /* _BACKWARD_STACK_H */
diff --git a/libstdc++-v3/include/backward/stream.h b/libstdc++-v3/include/backward/stream.h
deleted file mode 100644 (file)
index c137601..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_STREAM_H
-#define _BACKWARD_STREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/streambuf.h b/libstdc++-v3/include/backward/streambuf.h
deleted file mode 100644 (file)
index bac2449..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2000 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-#ifndef _BACKWARD_STREAMBUF_H
-#define _BACKWARD_STREAMBUF_H 1
-
-#include "backward_warning.h"
-#include <streambuf>
-
-using std::streambuf;
-
-#endif
diff --git a/libstdc++-v3/include/backward/tempbuf.h b/libstdc++-v3/include/backward/tempbuf.h
deleted file mode 100644 (file)
index af6e57d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_TEMPBUF_H
-#define _BACKWARD_TEMPBUF_H 1
-
-#include "backward_warning.h"
-#include "pair.h"
-#include "iterator.h"
-#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <bits/cpp_type_traits.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <ext/memory>
-
-using std::get_temporary_buffer;
-using std::return_temporary_buffer;
-using __gnu_cxx::temporary_buffer;
-
-#endif /* _BACKWARD_TEMPBUF_H */
diff --git a/libstdc++-v3/include/backward/tree.h b/libstdc++-v3/include/backward/tree.h
deleted file mode 100644 (file)
index 88a2f1d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_TREE
-#define _BACKWARD_TREE 1
-
-#include "backward_warning.h"
-#include <ext/rb_tree>
-
-using __gnu_cxx::rb_tree;
-
-#endif
diff --git a/libstdc++-v3/include/backward/vector.h b/libstdc++-v3/include/backward/vector.h
deleted file mode 100644 (file)
index 8cd8dd0..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_VECTOR_H
-#define _BACKWARD_VECTOR_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <vector>
-
-using std::vector;
-
-#endif /* _BACKWARD_VECTOR_H */
index 262834560d1179e8e35bfa5344cfe6674a620a77..51b8f2dde99326fce1c83965a001e2302863ed3e 100644 (file)
 
     namespace tr1 { }
   }
-
-  namespace __gnu_cxx
-  {
-    namespace __debug { }
-    namespace __norm { }
-  }
 */
 
 // Macros for activating various namespace association modes.
 // _GLIBCXX_STD
 // _GLIBCXX_STD_D
 // _GLIBCXX_STD_P
-// _GLIBCXX_EXT
-// _GLIBCXX_EXT_D
-// _GLIBCXX_EXT_P
 
 //
 // Macros for enclosing namepaces and possibly nested namespaces.
 # define _GLIBCXX_STD_D _GLIBCXX_STD
 # define _GLIBCXX_STD_P _GLIBCXX_STD
 # define _GLIBCXX_STD std
-# define _GLIBCXX_EXT_D _GLIBCXX_EXT
-# define _GLIBCXX_EXT_P _GLIBCXX_EXT
-# define _GLIBCXX_EXT __gnu_cxx
 # define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
 # define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
 # define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) {
 #  define _GLIBCXX_STD_D _GLIBCXX_STD
 #  define _GLIBCXX_STD_P _GLIBCXX_STD
 #  define _GLIBCXX_STD _6
-#  define _GLIBCXX_EXT _6
 #  define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
 #  define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
 # endif
 #  define _GLIBCXX_STD_D __norm
 #  define _GLIBCXX_STD_P _GLIBCXX_STD
 #  define _GLIBCXX_STD __cxx1998
-#  define _GLIBCXX_EXT_D __norm
-#  define _GLIBCXX_EXT_P _GLIBCXX_EXT
-#  define _GLIBCXX_EXT __cxx1998
 #  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) { 
 #  define _GLIBCXX_END_NAMESPACE }
 #  define _GLIBCXX_EXTERN_TEMPLATE 0
 #  define _GLIBCXX_STD_D _GLIBCXX_STD
 #  define _GLIBCXX_STD_P __norm
 #  define _GLIBCXX_STD __cxx1998
-#  define _GLIBCXX_EXT_D _GLIBCXX_EXT
-#  define _GLIBCXX_EXT_P __norm
-#  define _GLIBCXX_EXT __cxx1998
 #  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) { 
 #  define _GLIBCXX_END_NAMESPACE }
 #  define _GLIBCXX_EXTERN_TEMPLATE 0
 #  define _GLIBCXX_STD_D __norm
 #  define _GLIBCXX_STD_P __norm
 #  define _GLIBCXX_STD __cxx1998
-#  define _GLIBCXX_EXT_D __norm
-#  define _GLIBCXX_EXT_P __norm
-#  define _GLIBCXX_EXT __gnu_cxx
 #  define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) { 
 #  define _GLIBCXX_END_NAMESPACE }
 #  define _GLIBCXX_EXTERN_TEMPLATE 0
@@ -193,16 +171,6 @@ namespace std
   using namespace __debug __attribute__ ((strong)); 
   using namespace __cxx1998 __attribute__ ((strong)); 
 }
-
-namespace __gnu_cxx
-{
-  namespace __norm { }
-  namespace __debug { }
-  namespace __cxx1998 { }
-
-  using namespace __debug __attribute__ ((strong)); 
-  using namespace __cxx1998 __attribute__ ((strong)); 
-}
 #endif
 
 // Namespace associations for parallel mode.
@@ -216,16 +184,6 @@ namespace std
   using namespace __parallel __attribute__ ((strong));
   using namespace __cxx1998 __attribute__ ((strong)); 
 }
-
-namespace __gnu_cxx
-{
-  namespace __norm { }
-  namespace __parallel { }
-  namespace __cxx1998 { }
-
-  using namespace __parallel __attribute__ ((strong)); 
-  using namespace __cxx1998 __attribute__ ((strong)); 
-}
 #endif
 
 // Namespace associations for versioning mode.
index 46e4b6bf09e589dc3723065818c828a4a2fc28a4..32f96a37bedfcc2c94a1bc9473e53a0df416554f 100644 (file)
@@ -49,15 +49,9 @@ namespace std
   namespace __debug { } 
 }
 
-namespace __gnu_cxx
-{ 
-  namespace __debug { };
-}
-
 namespace __gnu_debug
 {
   using namespace std::__debug;
-  using namespace __gnu_cxx::__debug;
 }
 
 #ifndef _GLIBCXX_DEBUG
diff --git a/libstdc++-v3/include/debug/hash_map b/libstdc++-v3/include/debug/hash_map
deleted file mode 100644 (file)
index f44586b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Debugging hash_map/hash_multimap implementation -*- C++ -*-
-
-// Copyright (C) 2003, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-/** @file debug/hash_map
- *  This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MAP
-#define _GLIBCXX_DEBUG_HASH_MAP 1
-
-#include <ext/hash_map>
-#include <debug/hash_map.h>
-#include <debug/hash_multimap.h>
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_map.h b/libstdc++-v3/include/debug/hash_map.h
deleted file mode 100644 (file)
index aeac90b..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-// Debugging hash_map implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006, 2007
-// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-/** @file debug/hash_map.h
- *  This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MAP_H
-#define _GLIBCXX_DEBUG_HASH_MAP_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
-  template<typename _Value, typename _Tp,
-          typename _HashFcn  = __gnu_cxx::hash<_Value>,
-          typename _EqualKey = std::equal_to<_Value>,
-          typename _Alloc = std::allocator<_Value> >
-    class hash_map
-    : public _GLIBCXX_EXT_D::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>,
-      public __gnu_debug::_Safe_sequence<hash_map<_Value, _Tp, _HashFcn,
-                                                _EqualKey, _Alloc> >
-    {
-      typedef _GLIBCXX_EXT_D::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>
-                                                       _Base;
-      typedef __gnu_debug::_Safe_sequence<hash_map>    _Safe_base;
-
-    public:
-      typedef typename _Base::key_type        key_type;
-      typedef typename _Base::data_type       data_type;
-      typedef typename _Base::mapped_type     mapped_type;
-      typedef typename _Base::value_type      value_type;
-      typedef typename _Base::hasher          hasher;
-      typedef typename _Base::key_equal       key_equal;
-      typedef typename _Base::size_type       size_type;
-      typedef typename _Base::difference_type difference_type;
-      typedef typename _Base::pointer         pointer;
-      typedef typename _Base::const_pointer   const_pointer;
-      typedef typename _Base::reference       reference;
-      typedef typename _Base::const_reference const_reference;
-
-      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_map>
-                                             iterator;
-      typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
-                                         hash_map>
-                                             const_iterator;
-
-      typedef typename _Base::allocator_type  allocator_type;
-
-      using _Base::hash_funct;
-      using _Base::key_eq;
-      using _Base::get_allocator;
-
-      hash_map() { }
-
-      explicit hash_map(size_type __n) : _Base(__n) { }
-
-      hash_map(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
-      hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
-              const allocator_type& __a = allocator_type())
-      : _Base(__n, __hf, __eql, __a) { }
-
-      template<typename _InputIterator>
-        hash_map(_InputIterator __f, _InputIterator __l)
-        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
-      template<typename _InputIterator>
-        hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
-      template<typename _InputIterator>
-        hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf)
-        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
-
-      template<typename _InputIterator>
-        hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
-               __eql, __a) { }
-
-      hash_map(const _Base& __x) : _Base(__x), _Safe_base() { }
-
-      using _Base::size;
-      using _Base::max_size;
-      using _Base::empty;
-
-      void
-      swap(hash_map& __x)
-      {
-       _Base::swap(__x);
-       this->_M_swap(__x);
-      }
-
-      iterator
-      begin() { return iterator(_Base::begin(), this); }
-
-      iterator
-      end() { return iterator(_Base::end(),   this); }
-
-      const_iterator
-      begin() const
-      { return const_iterator(_Base::begin(), this); }
-
-      const_iterator
-      end() const
-      { return const_iterator(_Base::end(),   this); }
-
-      std::pair<iterator, bool>
-      insert(const value_type& __obj)
-      {
-       std::pair<typename _Base::iterator, bool> __res = _Base::insert(__obj);
-       return std::make_pair(iterator(__res.first, this), __res.second);
-      }
-
-      void
-      insert(const value_type* __first, const value_type* __last)
-      {
-       __glibcxx_check_valid_range(__first, __last);
-       _Base::insert(__first, __last);
-      }
-
-     template<typename _InputIterator>
-        void
-        insert(_InputIterator __first, _InputIterator __last)
-        {
-         __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first.base(), __last.base());
-       }
-
-
-      std::pair<iterator, bool>
-      insert_noresize(const value_type& __obj)
-      {
-       std::pair<typename _Base::iterator, bool> __res =
-                                               _Base::insert_noresize(__obj);
-       return std::make_pair(iterator(__res.first, this), __res.second);
-      }
-
-      iterator
-      find(const key_type& __key)
-      { return iterator(_Base::find(__key), this); }
-
-      const_iterator
-      find(const key_type& __key) const
-      { return const_iterator(_Base::find(__key), this); }
-
-      using _Base::operator[];
-      using _Base::count;
-
-      std::pair<iterator, iterator>
-      equal_range(const key_type& __key)
-      {
-       typedef typename _Base::iterator _Base_iterator;
-       std::pair<_Base_iterator, _Base_iterator> __res =
-                         _Base::equal_range(__key);
-       return std::make_pair(iterator(__res.first, this),
-                             iterator(__res.second, this));
-      }
-
-      std::pair<const_iterator, const_iterator>
-      equal_range(const key_type& __key) const
-      {
-       typedef typename _Base::const_iterator _Base_iterator;
-       std::pair<_Base_iterator, _Base_iterator> __res =
-       _Base::equal_range(__key);
-       return std::make_pair(const_iterator(__res.first, this),
-                             const_iterator(__res.second, this));
-      }
-
-      size_type
-      erase(const key_type& __key)
-      {
-       iterator __victim(_Base::find(__key), this);
-       if (__victim != end())
-         return this->erase(__victim), 1;
-       else
-         return 0;
-      }
-
-      void
-      erase(iterator __it)
-      {
-       __glibcxx_check_erase(__it);
-       __it._M_invalidate();
-       _Base::erase(__it.base());
-      }
-
-      void
-      erase(iterator __first, iterator __last)
-      {
-       __glibcxx_check_erase_range(__first, __last);
-       for (iterator __tmp = __first; __tmp != __last;)
-       {
-         iterator __victim = __tmp++;
-         __victim._M_invalidate();
-       }
-       _Base::erase(__first.base(), __last.base());
-      }
-
-      void
-      clear()
-      {
-       _Base::clear();
-       this->_M_invalidate_all();
-      }
-
-      using _Base::resize;
-      using _Base::bucket_count;
-      using _Base::max_bucket_count;
-      using _Base::elems_in_bucket;
-
-      _Base&
-      _M_base()       { return *this; }
-
-      const _Base&
-      _M_base() const { return *this; }
-
-    private:
-      void
-      _M_invalidate_all()
-      {
-       typedef typename _Base::const_iterator _Base_const_iterator;
-       typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
-       this->_M_invalidate_if(_Not_equal(_M_base().end()));
-      }
-    };
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline bool
-    operator==(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
-              const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
-    { return __x._M_base() == __y._M_base(); }
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline bool
-    operator!=(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
-              const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
-    { return __x._M_base() != __y._M_base(); }
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline void
-    swap(hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
-        hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
-    { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_multimap.h b/libstdc++-v3/include/debug/hash_multimap.h
deleted file mode 100644 (file)
index 985fbc8..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-// Debugging hash_multimap implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-/** @file debug/hash_multimap.h
- *  This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MULTIMAP_H
-#define _GLIBCXX_DEBUG_HASH_MULTIMAP_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
-  template<typename _Value, typename _Tp,
-          typename _HashFcn  = __gnu_cxx::hash<_Value>,
-          typename _EqualKey = std::equal_to<_Value>,
-          typename _Alloc =  std::allocator<_Value> >
-    class hash_multimap
-    : public _GLIBCXX_EXT_D::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>,
-      public __gnu_debug::_Safe_sequence<hash_multimap<_Value, _Tp, _HashFcn,
-                                                      _EqualKey, _Alloc> >
-    {
-      typedef _GLIBCXX_EXT_D::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>
-                                                       _Base;
-      typedef __gnu_debug::_Safe_sequence<hash_multimap> _Safe_base;
-
-  public:
-      typedef typename _Base::key_type                 key_type;
-      typedef typename _Base::data_type                        data_type;
-      typedef typename _Base::mapped_type              mapped_type;
-      typedef typename _Base::value_type               value_type;
-      typedef typename _Base::hasher                   hasher;
-      typedef typename _Base::key_equal                        key_equal;
-      typedef typename _Base::size_type                        size_type;
-      typedef typename _Base::difference_type          difference_type;
-      typedef typename _Base::pointer                  pointer;
-      typedef typename _Base::const_pointer            const_pointer;
-      typedef typename _Base::reference                        reference;
-      typedef typename _Base::const_reference          const_reference;
-
-      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
-                                         hash_multimap> iterator;
-      typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
-                                         hash_multimap> const_iterator;
-
-      typedef typename _Base::allocator_type              allocator_type;
-
-      using _Base::hash_funct;
-      using _Base::key_eq;
-      using _Base::get_allocator;
-
-      hash_multimap() { }
-
-      explicit hash_multimap(size_type __n) : _Base(__n) { }
-
-      hash_multimap(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
-      hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
-                   const allocator_type& __a = allocator_type())
-      : _Base(__n, __hf, __eql, __a) { }
-
-      template<typename _InputIterator>
-        hash_multimap(_InputIterator __f, _InputIterator __l)
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
-      template<typename _InputIterator>
-        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
-        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
-      template<typename _InputIterator>
-        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
-                     const hasher& __hf)
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
-
-      template<typename _InputIterator>
-        hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
-                     const hasher& __hf, const key_equal& __eql,
-                     const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
-               __eql, __a) { }
-
-      using _Base::size;
-      using _Base::max_size;
-      using _Base::empty;
-
-      void
-      swap(hash_multimap& __x)
-      {
-       _Base::swap(__x);
-       this->_M_swap(__x);
-      }
-
-      iterator
-      begin() { return iterator(_Base::begin(), this); }
-
-      iterator
-      end()   { return iterator(_Base::end(),   this); }
-
-      const_iterator
-      begin() const
-      { return const_iterator(_Base::begin(), this); }
-
-      const_iterator
-      end() const
-      { return const_iterator(_Base::end(),   this); }
-
-      iterator
-      insert(const value_type& __obj)
-      { return iterator(_Base::insert(__obj), this); }
-
-      template <typename _InputIterator>
-        void
-        insert(_InputIterator __first, _InputIterator __last)
-        {
-         __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first.base(), __last.base());
-       }
-
-      iterator
-      insert_noresize(const value_type& __obj)
-      { return iterator(_Base::insert_noresize(__obj), this); }
-
-      iterator
-      find(const key_type& __key)
-      { return iterator(_Base::find(__key), this); }
-
-      const_iterator
-      find(const key_type& __key) const
-      { return const_iterator(_Base::find(__key), this); }
-
-      using _Base::count;
-
-      std::pair<iterator, iterator>
-      equal_range(const key_type& __key)
-      {
-       typedef typename _Base::iterator _Base_iterator;
-       std::pair<_Base_iterator, _Base_iterator> __res =
-                                                    _Base::equal_range(__key);
-       return std::make_pair(iterator(__res.first, this),
-                             iterator(__res.second, this));
-      }
-
-      std::pair<const_iterator, const_iterator>
-      equal_range(const key_type& __key) const
-      {
-       typedef typename _Base::const_iterator _Base_iterator;
-       std::pair<_Base_iterator, _Base_iterator> __res =
-        _Base::equal_range(__key);
-       return std::make_pair(const_iterator(__res.first, this),
-                             const_iterator(__res.second, this));
-      }
-
-      size_type
-      erase(const key_type& __key)
-      {
-       std::pair<iterator, iterator> __victims = this->equal_range(__key);
-       std::size_t __num_victims = 0;
-       while (__victims.first != __victims.second)
-       {
-         this->erase(__victims.first++);
-         ++__num_victims;
-       }
-       return __num_victims;
-      }
-
-      void
-      erase(iterator __it)
-      {
-       __glibcxx_check_erase(__it);
-       __it._M_invalidate();
-       _Base::erase(__it.base());
-      }
-
-      void
-      erase(iterator __first, iterator __last)
-      {
-       __glibcxx_check_erase_range(__first, __last);
-       for (iterator __tmp = __first; __tmp != __last;)
-       {
-         iterator __victim = __tmp++;
-         __victim._M_invalidate();
-       }
-       _Base::erase(__first.base(), __last.base());
-      }
-
-      void
-      clear()
-      {
-       _Base::clear();
-       this->_M_invalidate_all();
-      }
-
-      using _Base::resize;
-      using _Base::bucket_count;
-      using _Base::max_bucket_count;
-      using _Base::elems_in_bucket;
-
-      _Base&
-      _M_base()       { return *this; }
-
-      const _Base&
-      _M_base() const { return *this; }
-
-    private:
-      void
-      _M_invalidate_all()
-      {
-       typedef typename _Base::const_iterator _Base_const_iterator;
-       typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
-       this->_M_invalidate_if(_Not_equal(_M_base().end()));
-      }
-    };
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline bool
-    operator==(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
-              const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
-    { return __x._M_base() == __y._M_base(); }
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline bool
-    operator!=(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
-              const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
-    { return __x._M_base() != __y._M_base(); }
-
-  template<typename _Value, typename _Tp, typename _HashFcn,
-          typename _EqualKey, typename _Alloc>
-    inline void
-    swap(hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
-        hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
-    { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_multiset.h b/libstdc++-v3/include/debug/hash_multiset.h
deleted file mode 100644 (file)
index 11efb5b..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-// Debugging hash_multiset implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-/** @file debug/hash_multiset.h
- *  This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MULTISET_H
-#define _GLIBCXX_DEBUG_HASH_MULTISET_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
-  template<typename _Value,
-          typename _HashFcn  = __gnu_cxx::hash<_Value>,
-          typename _EqualKey = std::equal_to<_Value>,
-          typename _Alloc =  std::allocator<_Value> >
-    class hash_multiset
-    : public _GLIBCXX_EXT_D::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>,
-      public __gnu_debug::_Safe_sequence<hash_multiset<_Value, _HashFcn,
-                                                      _EqualKey, _Alloc> >
-    {
-      typedef _GLIBCXX_EXT_D:: hash_multiset<_Value,_HashFcn, _EqualKey,_Alloc>
-                                                       _Base;
-      typedef __gnu_debug::_Safe_sequence<hash_multiset> _Safe_base;
-
-  public:
-    typedef typename _Base::key_type                   key_type;
-    typedef typename _Base::value_type                 value_type;
-    typedef typename _Base::hasher                     hasher;
-    typedef typename _Base::key_equal                  key_equal;
-    typedef typename _Base::size_type                  size_type;
-    typedef typename _Base::difference_type            difference_type;
-    typedef typename _Base::pointer                    pointer;
-    typedef typename _Base::const_pointer              const_pointer;
-    typedef typename _Base::reference                  reference;
-    typedef typename _Base::const_reference            const_reference;
-
-    typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
-                                        hash_multiset> iterator;
-    typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
-                                        hash_multiset> const_iterator;
-
-    typedef typename _Base::allocator_type              allocator_type;
-
-    using _Base::hash_funct;
-    using _Base::key_eq;
-    using _Base::get_allocator;
-
-    hash_multiset() { }
-
-    explicit hash_multiset(size_type __n) : _Base(__n) { }
-
-    hash_multiset(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
-    hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
-                 const allocator_type& __a = allocator_type())
-    : _Base(__n, __hf, __eql, __a)
-    { }
-
-    template<typename _InputIterator>
-      hash_multiset(_InputIterator __f, _InputIterator __l)
-      : _Base(__gnu_debug::__check_valid_range(__f, __l), __l)
-      { }
-
-    template<typename _InputIterator>
-      hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
-      : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n)
-      { }
-
-    template<typename _InputIterator>
-      hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
-                   const hasher& __hf)
-      : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf)
-      { }
-
-    template<typename _InputIterator>
-      hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
-                   const hasher& __hf, const key_equal& __eql,
-                   const allocator_type& __a = allocator_type())
-      : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
-             __eql, __a)
-      { }
-
-    hash_multiset(const _Base& __x) : _Base(__x), _Safe_base() { }
-
-    using _Base::size;
-    using _Base::max_size;
-    using _Base::empty;
-
-    void
-    swap(hash_multiset& __x)
-    {
-      _Base::swap(__x);
-      this->_M_swap(__x);
-    }
-
-    iterator begin() const { return iterator(_Base::begin(), this); }
-    iterator end() const   { return iterator(_Base::end(),   this); }
-
-    iterator
-    insert(const value_type& __obj)
-    { return iterator(_Base::insert(__obj), this); }
-
-    template <typename _InputIterator>
-      void
-      insert(_InputIterator __first, _InputIterator __last)
-      {
-       __glibcxx_check_valid_range(__first, __last);
-       _Base::insert(__first.base(), __last.base());
-      }
-
-
-    iterator
-    insert_noresize(const value_type& __obj)
-    { return iterator(_Base::insert_noresize(__obj), this); }
-
-    iterator
-    find(const key_type& __key) const
-    { return iterator(_Base::find(__key), this); }
-
-    using _Base::count;
-
-    std::pair<iterator, iterator>
-    equal_range(const key_type& __key) const
-    {
-      typedef typename _Base::iterator _Base_iterator;
-      std::pair<_Base_iterator, _Base_iterator> __res =
-       _Base::equal_range(__key);
-      return std::make_pair(iterator(__res.first, this),
-                           iterator(__res.second, this));
-    }
-
-    size_type
-    erase(const key_type& __key)
-    {
-      size_type __count = 0;
-      std::pair<iterator, iterator> __victims = this->equal_range(__key);
-      while (__victims.first != __victims.second)
-       {
-         this->erase(__victims++);
-         ++__count;
-       }
-      return __count;
-    }
-
-    void
-    erase(iterator __it)
-    {
-      __glibcxx_check_erase(__it);
-      __it._M_invalidate();
-      _Base::erase(__it.base());
-    }
-
-    void
-    erase(iterator __first, iterator __last)
-    {
-      __glibcxx_check_erase_range(__first, __last);
-      for (iterator __tmp = __first; __tmp != __last;)
-       {
-         iterator __victim = __tmp++;
-         __victim._M_invalidate();
-       }
-      _Base::erase(__first.base(), __last.base());
-    }
-
-    void
-    clear()
-    {
-      _Base::clear();
-      this->_M_invalidate_all();
-    }
-
-    using _Base::resize;
-    using _Base::bucket_count;
-    using _Base::max_bucket_count;
-    using _Base::elems_in_bucket;
-
-    _Base&       _M_base()       { return *this; }
-    const _Base& _M_base() const { return *this; }
-
-  private:
-    void
-    _M_invalidate_all()
-    {
-      typedef typename _Base::const_iterator _Base_const_iterator;
-      typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
-      this->_M_invalidate_if(_Not_equal(_M_base().end()));
-    }
-  };
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
-  inline bool
-  operator==(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-            const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-  { return __x._M_base() == __y._M_base(); }
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
-  inline bool
-  operator!=(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-            const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-  { return __x._M_base() != __y._M_base(); }
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
-  inline void
-  swap(hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-       hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-  { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_set b/libstdc++-v3/include/debug/hash_set
deleted file mode 100644 (file)
index 4b98fef..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Debugging hash_set/hash_multiset implementation -*- C++ -*-
-
-// Copyright (C) 2003, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// 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.
-
-/** @file debug/hash_set
- *  This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_SET
-#define _GLIBCXX_DEBUG_HASH_SET 1
-
-#include <ext/hash_set>
-#include <debug/hash_set.h>
-#include <debug/hash_multiset.h>
-
-#endif
similarity index 50%
rename from libstdc++-v3/include/debug/hash_set.h
rename to libstdc++-v3/include/debug/safe_association.h
index 9178063289b0032cfb43597b154e0c659e5b663e..dcb9ab44dbc9f1feafbd34e29c2782331b659eb3 100644 (file)
@@ -1,6 +1,6 @@
-// Debugging hash_set implementation -*- C++ -*-
+// Safe associated container base class implementation  -*- C++ -*-
 
-// Copyright (C) 2003, 2005, 2006, 2007
+// Copyright (C) 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-/** @file debug/hash_set.h
+/** @file debug/safe_association.h
  *  This file is a GNU debug extension to the Standard C++ Library.
  */
 
-#ifndef _GLIBCXX_DEBUG_HASH_SET_H
-#define _GLIBCXX_DEBUG_HASH_SET_H 1
+#ifndef _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H
+#define _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H 1
 
+#include <debug/debug.h>
+#include <debug/macros.h>
+#include <debug/functions.h>
+#include <debug/formatter.h>
 #include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
 
-namespace __gnu_cxx
+namespace __gnu_debug
 {
-namespace __debug
-{
-  template<typename _Value,
-          typename _HashFcn  = __gnu_cxx::hash<_Value>,
-          typename _EqualKey = std::equal_to<_Value>,
-          typename _Alloc =  std::allocator<_Value> >
-    class hash_set
-    : public _GLIBCXX_EXT_D::hash_set<_Value, _HashFcn, _EqualKey,_Alloc>,
-      public __gnu_debug::_Safe_sequence<hash_set<_Value, _HashFcn, _EqualKey,
-                                                 _Alloc> >
+  /**
+   * @brief Base class for constructing a "safe" associated container type.
+   *
+   * The class template %_Safe_association simplifies the construction of
+   * "safe" associated containers.
+   */
+  template<typename _Base>
+    class _Safe_association 
+    : public _Base
     {
-      typedef _GLIBCXX_EXT_D::hash_set<_Value, _HashFcn, _EqualKey,_Alloc> _Base;
-      typedef __gnu_debug::_Safe_sequence<hash_set> _Safe_base;
-
     public:
-      typedef typename _Base::key_type        key_type;
-      typedef typename _Base::value_type      value_type;
+      typedef typename _Base::size_type       size_type;
       typedef typename _Base::hasher          hasher;
       typedef typename _Base::key_equal       key_equal;
-      typedef typename _Base::size_type       size_type;
+      typedef typename _Base::allocator_type allocator_type;
+
+      typedef typename _Base::key_type        key_type;
+      typedef typename _Base::value_type      value_type;
       typedef typename _Base::difference_type difference_type;
-      typedef typename _Base::pointer         pointer;
-      typedef typename _Base::const_pointer   const_pointer;
       typedef typename _Base::reference       reference;
       typedef typename _Base::const_reference const_reference;
 
-      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_set>
+      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, 
+                                         _Safe_association>
                                               iterator;
       typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
-                                         hash_set>
+                                         _Safe_association>
                                               const_iterator;
 
-      typedef typename _Base::allocator_type allocator_type;
+      _Safe_association() { }
 
-      using _Base::hash_funct;
-      using _Base::key_eq;
-      using _Base::get_allocator;
-
-      hash_set() { }
+      explicit _Safe_association(size_type __n) : _Base(__n) { }
 
-      explicit hash_set(size_type __n) : _Base(__n) { }
+      _Safe_association(size_type __n, const hasher& __hf) 
+      : _Base(__n, __hf) { }
 
-      hash_set(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
-      hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
-              const allocator_type& __a = allocator_type())
+      _Safe_association(size_type __n, const hasher& __hf, 
+                       const key_equal& __eql,
+                       const allocator_type& __a = allocator_type())
       : _Base(__n, __hf, __eql, __a) { }
 
-      template<typename _InputIterator>
-        hash_set(_InputIterator __f, _InputIterator __l)
-        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
+      template<typename _InputIter>
+        _Safe_association(_InputIter __f, _InputIter __l)
+       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
 
-      template<typename _InputIterator>
-        hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+      template<typename _InputIter>
+        _Safe_association(_InputIter __f, _InputIter __l, size_type __n)
        : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
 
-      template<typename _InputIterator>
-        hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf)
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
+      template<typename _InputIter>
+        _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
+                     const hasher& __hf)
+       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) 
+        { }
 
-      template<typename _InputIterator>
-        hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
-               __eql, __a) { }
+      template<typename _InputIter>
+        _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
+                         const hasher& __hf, const key_equal& __eql,
+                         const allocator_type& __a = allocator_type())
+       : _Base(__gnu_debug::__check_valid_range(__f, __l), 
+               __l, __n, __hf, __eql, __a) 
+        { }
 
-      hash_set(const _Base& __x) : _Base(__x), _Safe_base() { }
+      _Safe_association(const _Base& __x) : _Base(__x) { }
 
       using _Base::size;
       using _Base::max_size;
       using _Base::empty;
+      using _Base::get_allocator;
+      using _Base::key_eq;
 
-      void
-      swap(hash_set& __x)
-      {
-       _Base::swap(__x);
-       this->_M_swap(__x);
-      }
+      using _Base::count;
+      using _Base::bucket_count;
+      using _Base::max_bucket_count;
+      using _Base::bucket;
+      using _Base::bucket_size;
+      using _Base::load_factor;
 
-      iterator
-      begin() const { return iterator(_Base::begin(), this); }
+      const_iterator
+      begin() const { return const_iterator(_Base::begin(), this); }
 
-      iterator
-      end() const   { return iterator(_Base::end(),   this); }
+      const_iterator
+      end() const   { return const_iterator(_Base::end(), this); }
 
       std::pair<iterator, bool>
       insert(const value_type& __obj)
       {
-       std::pair<typename _Base::iterator, bool> __res =
-        _Base::insert(__obj);
+       typedef std::pair<typename _Base::iterator, bool> __pair_type;
+       __pair_type __res = _Base::insert(__obj);
        return std::make_pair(iterator(__res.first, this), __res.second);
       }
 
@@ -142,58 +142,50 @@ namespace __debug
        _Base::insert(__first, __last);
       }
 
-      template<typename _InputIterator>
+      template<typename _InputIter>
         void
-        insert(_InputIterator __first, _InputIterator __last)
+        insert(_InputIter __first, _InputIter __last)
         {
          __glibcxx_check_valid_range(__first, __last);
          _Base::insert(__first.base(), __last.base());
        }
 
-
-      std::pair<iterator, bool>
-      insert_noresize(const value_type& __obj)
-      {
-       std::pair<typename _Base::iterator, bool> __res =
-        _Base::insert_noresize(__obj);
-       return std::make_pair(iterator(__res.first, this), __res.second);
-      }
-
-      iterator
+      const_iterator
       find(const key_type& __key) const
-      { return iterator(_Base::find(__key), this); }
+      { return const_iterator(_Base::find(__key), this); }
 
-      using _Base::count;
-
-      std::pair<iterator, iterator>
+      std::pair<const_iterator, const_iterator>
       equal_range(const key_type& __key) const
       {
-       typedef typename _Base::iterator _Base_iterator;
-       std::pair<_Base_iterator, _Base_iterator> __res =
-         _Base::equal_range(__key);
-       return std::make_pair(iterator(__res.first, this),
-                             iterator(__res.second, this));
+       typedef typename _Base::const_iterator _Base_iterator;
+       typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+       __pair_type __res = _Base::equal_range(__key);
+       return std::make_pair(const_iterator(__res.first, this),
+                             const_iterator(__res.second, this));
       }
 
       size_type
       erase(const key_type& __key)
       {
+       size_type __ret(0);
        iterator __victim(_Base::find(__key), this);
        if (__victim != end())
-         return this->erase(__victim), 1;
-       else
-         return 0;
+         {
+           this->erase(__victim);
+           __ret = 1;
+         }
+       return __ret;
       }
 
-      void
+      iterator
       erase(iterator __it)
       {
        __glibcxx_check_erase(__it);
        __it._M_invalidate();
-       _Base::erase(__it.base());
+       return iterator(_Base::erase(__it.base()));
       }
 
-      void
+      iterator
       erase(iterator __first, iterator __last)
       {
        __glibcxx_check_erase_range(__first, __last);
@@ -202,7 +194,7 @@ namespace __debug
          iterator __victim = __tmp++;
          __victim._M_invalidate();
        }
-       _Base::erase(__first.base(), __last.base());
+       return iterator(_Base::erase(__first.base(), __last.base()));
       }
 
       void
@@ -212,13 +204,8 @@ namespace __debug
        this->_M_invalidate_all();
       }
 
-      using _Base::resize;
-      using _Base::bucket_count;
-      using _Base::max_bucket_count;
-      using _Base::elems_in_bucket;
-
       _Base&
-      _M_base()       { return *this; }
+      _M_base() { return *this; }
 
       const _Base&
       _M_base() const { return *this; }
@@ -232,28 +219,6 @@ namespace __debug
        this->_M_invalidate_if(_Not_equal(_M_base().end()));
       }
     };
-
-  template<typename _Value, typename _HashFcn, typename _EqualKey,
-          typename _Alloc>
-    inline bool
-    operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-              const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-    { return __x._M_base() == __y._M_base(); }
-
-  template<typename _Value, typename _HashFcn, typename _EqualKey,
-          typename _Alloc>
-    inline bool
-    operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-              const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-    { return __x._M_base() != __y._M_base(); }
-
-  template<typename _Value, typename _HashFcn, typename _EqualKey,
-          typename _Alloc>
-    inline void
-    swap(hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
-        hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
-    { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
+} // namespace __gnu_debug
 
 #endif
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
new file mode 100644 (file)
index 0000000..a88a972
--- /dev/null
@@ -0,0 +1,199 @@
+// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2005, 2007
+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file debug/unordered_map
+ *  This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_MAP
+#define _GLIBCXX_DEBUG_UNORDERED_MAP 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_map>
+#else
+# include <c++0x_warning.h>
+#endif
+#include <debug/safe_association.h>
+#include <debug/safe_iterator.h>
+
+#define _GLIBCXX_BASE unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __debug
+{
+  template<typename _Key, typename _Tp,
+          typename _Hash  = std::hash<_Key>,
+          typename _Pred = std::equal_to<_Key>,
+          typename _Alloc =  std::allocator<_Key> >
+    class unordered_map
+    : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+      public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+    {
+      typedef typename _GLIBCXX_STD_BASE _Base;
+      typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+      typedef __gnu_debug::_Safe_sequence<unordered_map> _Safe_base;
+
+    public:
+      typedef typename _Safe_assoc::size_type       size_type;
+      typedef typename _Safe_assoc::hasher          hasher;
+      typedef typename _Safe_assoc::key_equal       key_equal;
+      typedef typename _Safe_assoc::allocator_type allocator_type;
+
+      explicit
+      unordered_map(size_type __n = 10,
+                   const hasher& __hf = hasher(),
+                   const key_equal& __eql = key_equal(),
+                   const allocator_type& __a = allocator_type())
+      : _Safe_assoc(__n, __hf, __eql, __a)
+      { }
+
+      template<typename _InputIterator>
+        unordered_map(_InputIterator __f, _InputIterator __l, 
+                     size_type __n = 10,
+                     const hasher& __hf = hasher(), 
+                     const key_equal& __eql = key_equal(), 
+                     const allocator_type& __a = allocator_type())
+       : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+        { }
+
+      unordered_map(const _Safe_assoc& __x) 
+      : _Safe_assoc(__x), _Safe_base() { }
+
+      void
+      swap(unordered_map& __x)
+      {
+       _Safe_assoc::swap(__x);
+       _Safe_base::_M_swap(__x);
+      }
+    };
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline bool
+    operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+              const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() == __y._M_base(); }
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline bool
+    operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+              const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() != __y._M_base(); }
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline void
+    swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+        unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { __x.swap(__y); }
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
+
+  template<typename _Key, typename _Tp,
+          typename _Hash  = std::hash<_Key>,
+          typename _Pred = std::equal_to<_Key>,
+          typename _Alloc =  std::allocator<_Key> >
+    class unordered_multimap
+    : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+      public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+    {
+      typedef typename _GLIBCXX_STD_BASE _Base;
+      typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+      typedef __gnu_debug::_Safe_sequence<unordered_multimap> _Safe_base;
+
+    public:
+      typedef typename _Safe_assoc::size_type       size_type;
+      typedef typename _Safe_assoc::hasher          hasher;
+      typedef typename _Safe_assoc::key_equal       key_equal;
+      typedef typename _Safe_assoc::allocator_type allocator_type;
+
+      explicit
+      unordered_multimap(size_type __n = 10,
+                   const hasher& __hf = hasher(),
+                   const key_equal& __eql = key_equal(),
+                   const allocator_type& __a = allocator_type())
+      : _Safe_assoc(__n, __hf, __eql, __a)
+      { }
+
+      template<typename _InputIterator>
+        unordered_multimap(_InputIterator __f, _InputIterator __l, 
+                     size_type __n = 10,
+                     const hasher& __hf = hasher(), 
+                     const key_equal& __eql = key_equal(), 
+                     const allocator_type& __a = allocator_type())
+       : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+        { }
+
+      unordered_multimap(const _Safe_assoc& __x) 
+      : _Safe_assoc(__x), _Safe_base() { }
+
+      void
+      swap(unordered_multimap& __x)
+      {
+       _Safe_assoc::swap(__x);
+       _Safe_base::_M_swap(__x);
+      }
+    };
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline bool
+    operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+              const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() == __y._M_base(); }
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline bool
+    operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+              const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() != __y._M_base(); }
+
+  template<typename _Key, typename _Tp, typename _Hash,
+          typename _Pred, typename _Alloc>
+    inline void
+    swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+        unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+    { __x.swap(__y); }
+
+
+} // namespace __debug
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
new file mode 100644 (file)
index 0000000..a49b4b0
--- /dev/null
@@ -0,0 +1,192 @@
+// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2005, 2007
+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file debug/unordered_set
+ *  This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_SET
+#define _GLIBCXX_DEBUG_UNORDERED_SET 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_set>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <debug/safe_association.h>
+#include <debug/safe_iterator.h>
+
+#define _GLIBCXX_BASE unordered_set<_Value, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __debug
+{
+  template<typename _Value,
+          typename _Hash  = std::hash<_Value>,
+          typename _Pred = std::equal_to<_Value>,
+          typename _Alloc =  std::allocator<_Value> >
+    class unordered_set
+    : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+      public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+    {
+      typedef typename _GLIBCXX_STD_BASE _Base;
+      typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+      typedef __gnu_debug::_Safe_sequence<unordered_set> _Safe_base;
+
+    public:
+      typedef typename _Safe_assoc::size_type       size_type;
+      typedef typename _Safe_assoc::hasher          hasher;
+      typedef typename _Safe_assoc::key_equal       key_equal;
+      typedef typename _Safe_assoc::allocator_type allocator_type;
+
+      explicit
+      unordered_set(size_type __n = 10,
+                   const hasher& __hf = hasher(),
+                   const key_equal& __eql = key_equal(),
+                   const allocator_type& __a = allocator_type())
+      : _Safe_assoc(__n, __hf, __eql, __a)
+      { }
+
+      template<typename _InputIterator>
+        unordered_set(_InputIterator __f, _InputIterator __l, 
+                     size_type __n = 10,
+                     const hasher& __hf = hasher(), 
+                     const key_equal& __eql = key_equal(), 
+                     const allocator_type& __a = allocator_type())
+       : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+        { }
+
+      unordered_set(const _Safe_assoc& __x) 
+      : _Safe_assoc(__x), _Safe_base() { }
+
+      void
+      swap(unordered_set& __x)
+      {
+       _Safe_assoc::swap(__x);
+       _Safe_base::_M_swap(__x);
+      }
+    };
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline bool
+    operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+              const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() == __y._M_base(); }
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline bool
+    operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+              const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() != __y._M_base(); }
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline void
+    swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+        unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+    { __x.swap(__y); }
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
+
+  template<typename _Value,
+          typename _Hash  = std::hash<_Value>,
+          typename _Pred = std::equal_to<_Value>,
+          typename _Alloc =  std::allocator<_Value> >
+    class unordered_multiset
+    : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+      public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+    {
+      typedef typename _GLIBCXX_STD_BASE _Base;
+      typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+      typedef __gnu_debug::_Safe_sequence<unordered_multiset> _Safe_base;
+
+    public:
+      typedef typename _Safe_assoc::size_type       size_type;
+      typedef typename _Safe_assoc::hasher          hasher;
+      typedef typename _Safe_assoc::key_equal       key_equal;
+      typedef typename _Safe_assoc::allocator_type allocator_type;
+
+      explicit
+      unordered_multiset(size_type __n = 10,
+                   const hasher& __hf = hasher(),
+                   const key_equal& __eql = key_equal(),
+                   const allocator_type& __a = allocator_type())
+      : _Safe_assoc(__n, __hf, __eql, __a)
+      { }
+
+      template<typename _InputIterator>
+        unordered_multiset(_InputIterator __f, _InputIterator __l, 
+                     size_type __n = 10,
+                     const hasher& __hf = hasher(), 
+                     const key_equal& __eql = key_equal(), 
+                     const allocator_type& __a = allocator_type())
+       : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+        { }
+
+      unordered_multiset(const _Safe_assoc& __x) 
+      : _Safe_assoc(__x), _Safe_base() { }
+
+      void
+      swap(unordered_multiset& __x)
+      {
+       _Safe_assoc::swap(__x);
+       _Safe_base::_M_swap(__x);
+      }
+    };
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline bool
+    operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+              const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() == __y._M_base(); }
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline bool
+    operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+              const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+    { return __x._M_base() != __y._M_base(); }
+
+  template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+    inline void
+    swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+        unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+    { __x.swap(__y); }
+} // namespace __debug
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/ext/hashtable.h b/libstdc++-v3/include/ext/hashtable.h
deleted file mode 100644 (file)
index e73b7df..0000000
+++ /dev/null
@@ -1,1130 +0,0 @@
-// Hashtable implementation used by containers -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
-// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file ext/hashtable.h
- *  This file is a GNU extension to the Standard C++ Library (possibly
- *  containing extensions from the HP/SGI STL subset).
- */
-
-#ifndef _HASHTABLE_H
-#define _HASHTABLE_H 1
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set, hash_map, hash_multiset, and hash_multimap.
-
-#include <vector>
-#include <iterator>
-#include <algorithm>
-#include <bits/stl_function.h>
-#include <ext/hash_fun.h>
-
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
-  using std::size_t;
-  using std::ptrdiff_t;
-  using std::forward_iterator_tag;
-  using std::input_iterator_tag;
-  using std::_Construct;
-  using std::_Destroy;
-  using std::distance;
-  using std::vector;
-  using std::pair;
-  using std::__iterator_category;
-
-  template<class _Val>
-    struct _Hashtable_node
-    {
-      _Hashtable_node* _M_next;
-      _Val _M_val;
-    };
-
-  template<class _Val, class _Key, class _HashFcn, class _ExtractKey, 
-          class _EqualKey, class _Alloc = std::allocator<_Val> >
-    class hashtable;
-
-  template<class _Val, class _Key, class _HashFcn,
-          class _ExtractKey, class _EqualKey, class _Alloc>
-    struct _Hashtable_iterator;
-
-  template<class _Val, class _Key, class _HashFcn,
-          class _ExtractKey, class _EqualKey, class _Alloc>
-    struct _Hashtable_const_iterator;
-
-  template<class _Val, class _Key, class _HashFcn,
-          class _ExtractKey, class _EqualKey, class _Alloc>
-    struct _Hashtable_iterator
-    {
-      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
-        _Hashtable;
-      typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
-                                 _ExtractKey, _EqualKey, _Alloc>
-        iterator;
-      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
-                                       _ExtractKey, _EqualKey, _Alloc>
-        const_iterator;
-      typedef _Hashtable_node<_Val> _Node;
-      typedef forward_iterator_tag iterator_category;
-      typedef _Val value_type;
-      typedef ptrdiff_t difference_type;
-      typedef size_t size_type;
-      typedef _Val& reference;
-      typedef _Val* pointer;
-      
-      _Node* _M_cur;
-      _Hashtable* _M_ht;
-
-      _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
-      : _M_cur(__n), _M_ht(__tab) { }
-
-      _Hashtable_iterator() { }
-
-      reference
-      operator*() const
-      { return _M_cur->_M_val; }
-
-      pointer
-      operator->() const
-      { return &(operator*()); }
-
-      iterator&
-      operator++();
-
-      iterator
-      operator++(int);
-
-      bool
-      operator==(const iterator& __it) const
-      { return _M_cur == __it._M_cur; }
-
-      bool
-      operator!=(const iterator& __it) const
-      { return _M_cur != __it._M_cur; }
-    };
-
-  template<class _Val, class _Key, class _HashFcn,
-          class _ExtractKey, class _EqualKey, class _Alloc>
-    struct _Hashtable_const_iterator
-    {
-      typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
-        _Hashtable;
-      typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
-                                 _ExtractKey,_EqualKey,_Alloc>
-        iterator;
-      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
-                                       _ExtractKey, _EqualKey, _Alloc>
-        const_iterator;
-      typedef _Hashtable_node<_Val> _Node;
-
-      typedef forward_iterator_tag iterator_category;
-      typedef _Val value_type;
-      typedef ptrdiff_t difference_type;
-      typedef size_t size_type;
-      typedef const _Val& reference;
-      typedef const _Val* pointer;
-      
-      const _Node* _M_cur;
-      const _Hashtable* _M_ht;
-
-      _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
-      : _M_cur(__n), _M_ht(__tab) { }
-
-      _Hashtable_const_iterator() { }
-
-      _Hashtable_const_iterator(const iterator& __it)
-      : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
-
-      reference
-      operator*() const
-      { return _M_cur->_M_val; }
-
-      pointer
-      operator->() const
-      { return &(operator*()); }
-
-      const_iterator&
-      operator++();
-
-      const_iterator
-      operator++(int);
-
-      bool
-      operator==(const const_iterator& __it) const
-      { return _M_cur == __it._M_cur; }
-
-      bool
-      operator!=(const const_iterator& __it) const
-      { return _M_cur != __it._M_cur; }
-    };
-
-  // Note: assumes long is at least 32 bits.
-  enum { _S_num_primes = 28 };
-
-  static const unsigned long __stl_prime_list[_S_num_primes] =
-    {
-      53ul,         97ul,         193ul,       389ul,       769ul,
-      1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
-      49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
-      1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
-      50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,
-      1610612741ul, 3221225473ul, 4294967291ul
-    };
-
-  inline unsigned long
-  __stl_next_prime(unsigned long __n)
-  {
-    const unsigned long* __first = __stl_prime_list;
-    const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
-    const unsigned long* pos = std::lower_bound(__first, __last, __n);
-    return pos == __last ? *(__last - 1) : *pos;
-  }
-
-  // Forward declaration of operator==.  
-  template<class _Val, class _Key, class _HF, class _Ex,
-          class _Eq, class _All>
-    class hashtable;
-
-  template<class _Val, class _Key, class _HF, class _Ex,
-          class _Eq, class _All>
-    bool
-    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
-              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
-
-  // Hashtables handle allocators a bit differently than other
-  // containers do.  If we're using standard-conforming allocators, then
-  // a hashtable unconditionally has a member variable to hold its
-  // allocator, even if it so happens that all instances of the
-  // allocator type are identical.  This is because, for hashtables,
-  // this extra storage is negligible.  Additionally, a base class
-  // wouldn't serve any other purposes; it wouldn't, for example,
-  // simplify the exception-handling code.  
-  template<class _Val, class _Key, class _HashFcn,
-          class _ExtractKey, class _EqualKey, class _Alloc>
-    class hashtable
-    {
-    public:
-      typedef _Key key_type;
-      typedef _Val value_type;
-      typedef _HashFcn hasher;
-      typedef _EqualKey key_equal;
-
-      typedef size_t            size_type;
-      typedef ptrdiff_t         difference_type;
-      typedef value_type*       pointer;
-      typedef const value_type* const_pointer;
-      typedef value_type&       reference;
-      typedef const value_type& const_reference;
-
-      hasher
-      hash_funct() const
-      { return _M_hash; }
-
-      key_equal
-      key_eq() const
-      { return _M_equals; }
-
-    private:
-      typedef _Hashtable_node<_Val> _Node;
-
-    public:
-      typedef typename _Alloc::template rebind<value_type>::other allocator_type;
-      allocator_type
-      get_allocator() const
-      { return _M_node_allocator; }
-
-    private:
-      typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
-      typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
-      typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
-
-      _Node_Alloc _M_node_allocator;
-
-      _Node*
-      _M_get_node()
-      { return _M_node_allocator.allocate(1); }
-
-      void
-      _M_put_node(_Node* __p)
-      { _M_node_allocator.deallocate(__p, 1); }
-
-    private:
-      hasher                _M_hash;
-      key_equal             _M_equals;
-      _ExtractKey           _M_get_key;
-      _Vector_type          _M_buckets;
-      size_type             _M_num_elements;
-      
-    public:
-      typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
-                                 _EqualKey, _Alloc>
-        iterator;
-      typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
-                                       _EqualKey, _Alloc>
-        const_iterator;
-
-      friend struct
-      _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
-
-      friend struct
-      _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
-                               _EqualKey, _Alloc>;
-
-    public:
-      hashtable(size_type __n, const _HashFcn& __hf,
-               const _EqualKey& __eql, const _ExtractKey& __ext,
-               const allocator_type& __a = allocator_type())
-      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
-       _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
-      { _M_initialize_buckets(__n); }
-
-      hashtable(size_type __n, const _HashFcn& __hf,
-               const _EqualKey& __eql,
-               const allocator_type& __a = allocator_type())
-      : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
-       _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
-      { _M_initialize_buckets(__n); }
-
-      hashtable(const hashtable& __ht)
-      : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
-      _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
-      _M_buckets(__ht.get_allocator()), _M_num_elements(0)
-      { _M_copy_from(__ht); }
-
-      hashtable&
-      operator= (const hashtable& __ht)
-      {
-       if (&__ht != this)
-         {
-           clear();
-           _M_hash = __ht._M_hash;
-           _M_equals = __ht._M_equals;
-           _M_get_key = __ht._M_get_key;
-           _M_copy_from(__ht);
-         }
-       return *this;
-      }
-
-      ~hashtable()
-      { clear(); }
-
-      size_type
-      size() const
-      { return _M_num_elements; }
-
-      size_type
-      max_size() const
-      { return size_type(-1); }
-
-      bool
-      empty() const
-      { return size() == 0; }
-
-      void
-      swap(hashtable& __ht)
-      {
-       std::swap(_M_hash, __ht._M_hash);
-       std::swap(_M_equals, __ht._M_equals);
-       std::swap(_M_get_key, __ht._M_get_key);
-       _M_buckets.swap(__ht._M_buckets);
-       std::swap(_M_num_elements, __ht._M_num_elements);
-      }
-
-      iterator
-      begin()
-      {
-       for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
-         if (_M_buckets[__n])
-           return iterator(_M_buckets[__n], this);
-       return end();
-      }
-
-      iterator
-      end()
-      { return iterator(0, this); }
-
-      const_iterator
-      begin() const
-      {
-       for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
-         if (_M_buckets[__n])
-           return const_iterator(_M_buckets[__n], this);
-       return end();
-      }
-
-      const_iterator
-      end() const
-      { return const_iterator(0, this); }
-
-      template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
-               class _Al>
-        friend bool
-        operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
-                  const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
-
-    public:
-      size_type
-      bucket_count() const
-      { return _M_buckets.size(); }
-
-      size_type
-      max_bucket_count() const
-      { return __stl_prime_list[(int)_S_num_primes - 1]; }
-
-      size_type
-      elems_in_bucket(size_type __bucket) const
-      {
-       size_type __result = 0;
-       for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
-         __result += 1;
-       return __result;
-      }
-
-      pair<iterator, bool>
-      insert_unique(const value_type& __obj)
-      {
-       resize(_M_num_elements + 1);
-       return insert_unique_noresize(__obj);
-      }
-
-      iterator
-      insert_equal(const value_type& __obj)
-      {
-       resize(_M_num_elements + 1);
-       return insert_equal_noresize(__obj);
-      }
-
-      pair<iterator, bool>
-      insert_unique_noresize(const value_type& __obj);
-
-      iterator
-      insert_equal_noresize(const value_type& __obj);
-
-      template<class _InputIterator>
-        void
-        insert_unique(_InputIterator __f, _InputIterator __l)
-        { insert_unique(__f, __l, __iterator_category(__f)); }
-
-      template<class _InputIterator>
-        void
-        insert_equal(_InputIterator __f, _InputIterator __l)
-        { insert_equal(__f, __l, __iterator_category(__f)); }
-
-      template<class _InputIterator>
-        void
-        insert_unique(_InputIterator __f, _InputIterator __l,
-                     input_iterator_tag)
-        {
-         for ( ; __f != __l; ++__f)
-           insert_unique(*__f);
-       }
-
-      template<class _InputIterator>
-        void
-        insert_equal(_InputIterator __f, _InputIterator __l,
-                    input_iterator_tag)
-        {
-         for ( ; __f != __l; ++__f)
-           insert_equal(*__f);
-       }
-
-      template<class _ForwardIterator>
-        void
-        insert_unique(_ForwardIterator __f, _ForwardIterator __l,
-                     forward_iterator_tag)
-        {
-         size_type __n = distance(__f, __l);
-         resize(_M_num_elements + __n);
-         for ( ; __n > 0; --__n, ++__f)
-           insert_unique_noresize(*__f);
-       }
-
-      template<class _ForwardIterator>
-        void
-        insert_equal(_ForwardIterator __f, _ForwardIterator __l,
-                    forward_iterator_tag)
-        {
-         size_type __n = distance(__f, __l);
-         resize(_M_num_elements + __n);
-         for ( ; __n > 0; --__n, ++__f)
-           insert_equal_noresize(*__f);
-       }
-
-      reference
-      find_or_insert(const value_type& __obj);
-
-      iterator
-      find(const key_type& __key)
-      {
-       size_type __n = _M_bkt_num_key(__key);
-       _Node* __first;
-       for (__first = _M_buckets[__n];
-            __first && !_M_equals(_M_get_key(__first->_M_val), __key);
-            __first = __first->_M_next)
-         { }
-       return iterator(__first, this);
-      }
-
-      const_iterator
-      find(const key_type& __key) const
-      {
-       size_type __n = _M_bkt_num_key(__key);
-       const _Node* __first;
-       for (__first = _M_buckets[__n];
-            __first && !_M_equals(_M_get_key(__first->_M_val), __key);
-            __first = __first->_M_next)
-         { }
-       return const_iterator(__first, this);
-      }
-
-      size_type
-      count(const key_type& __key) const
-      {
-       const size_type __n = _M_bkt_num_key(__key);
-       size_type __result = 0;
-       
-       for (const _Node* __cur = _M_buckets[__n]; __cur;
-            __cur = __cur->_M_next)
-         if (_M_equals(_M_get_key(__cur->_M_val), __key))
-           ++__result;
-       return __result;
-      }
-
-      pair<iterator, iterator>
-      equal_range(const key_type& __key);
-
-      pair<const_iterator, const_iterator>
-      equal_range(const key_type& __key) const;
-
-      size_type
-      erase(const key_type& __key);
-      
-      void
-      erase(const iterator& __it);
-
-      void
-      erase(iterator __first, iterator __last);
-
-      void
-      erase(const const_iterator& __it);
-
-      void
-      erase(const_iterator __first, const_iterator __last);
-
-      void
-      resize(size_type __num_elements_hint);
-
-      void
-      clear();
-
-    private:
-      size_type
-      _M_next_size(size_type __n) const
-      { return __stl_next_prime(__n); }
-
-      void
-      _M_initialize_buckets(size_type __n)
-      {
-       const size_type __n_buckets = _M_next_size(__n);
-       _M_buckets.reserve(__n_buckets);
-       _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
-       _M_num_elements = 0;
-      }
-
-      size_type
-      _M_bkt_num_key(const key_type& __key) const
-      { return _M_bkt_num_key(__key, _M_buckets.size()); }
-
-      size_type
-      _M_bkt_num(const value_type& __obj) const
-      { return _M_bkt_num_key(_M_get_key(__obj)); }
-
-      size_type
-      _M_bkt_num_key(const key_type& __key, size_t __n) const
-      { return _M_hash(__key) % __n; }
-
-      size_type
-      _M_bkt_num(const value_type& __obj, size_t __n) const
-      { return _M_bkt_num_key(_M_get_key(__obj), __n); }
-
-      _Node*
-      _M_new_node(const value_type& __obj)
-      {
-       _Node* __n = _M_get_node();
-       __n->_M_next = 0;
-       try
-         {
-           this->get_allocator().construct(&__n->_M_val, __obj);
-           return __n;
-         }
-       catch(...)
-         {
-           _M_put_node(__n);
-           __throw_exception_again;
-         }
-      }
-
-      void
-      _M_delete_node(_Node* __n)
-      {
-       this->get_allocator().destroy(&__n->_M_val);
-       _M_put_node(__n);
-      }
-      
-      void
-      _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
-
-      void
-      _M_erase_bucket(const size_type __n, _Node* __last);
-
-      void
-      _M_copy_from(const hashtable& __ht);
-    };
-
-  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
-           class _All>
-    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
-    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
-    operator++()
-    {
-      const _Node* __old = _M_cur;
-      _M_cur = _M_cur->_M_next;
-      if (!_M_cur)
-       {
-         size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
-         while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
-           _M_cur = _M_ht->_M_buckets[__bucket];
-       }
-      return *this;
-    }
-
-  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
-           class _All>
-    inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
-    _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
-    operator++(int)
-    {
-      iterator __tmp = *this;
-      ++*this;
-      return __tmp;
-    }
-
-  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
-           class _All>
-    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
-    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
-    operator++()
-    {
-      const _Node* __old = _M_cur;
-      _M_cur = _M_cur->_M_next;
-      if (!_M_cur)
-       {
-         size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
-         while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
-           _M_cur = _M_ht->_M_buckets[__bucket];
-       }
-      return *this;
-    }
-
-  template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
-           class _All>
-    inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
-    _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
-    operator++(int)
-    {
-      const_iterator __tmp = *this;
-      ++*this;
-      return __tmp;
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    bool
-    operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
-              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
-    {
-      typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
-
-      if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
-       return false;
-
-      for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
-       {
-         _Node* __cur1 = __ht1._M_buckets[__n];
-         _Node* __cur2 = __ht2._M_buckets[__n];
-         // Check same length of lists
-         for (; __cur1 && __cur2;
-              __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
-           { } 
-         if (__cur1 || __cur2)
-           return false;
-         // Now check one's elements are in the other
-         for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
-              __cur1 = __cur1->_M_next)
-           {
-             bool _found__cur1 = false;
-             for (__cur2 = __ht2._M_buckets[__n];
-                  __cur2; __cur2 = __cur2->_M_next)
-               {
-                 if (__cur1->_M_val == __cur2->_M_val)
-                   {
-                     _found__cur1 = true;
-                     break;
-                   }
-               }
-             if (!_found__cur1)
-               return false;
-           }
-       }
-      return true;
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    inline bool
-    operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
-              const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
-    { return !(__ht1 == __ht2); }
-
-  template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
-           class _All>
-    inline void
-    swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
-        hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
-    { __ht1.swap(__ht2); }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    insert_unique_noresize(const value_type& __obj)
-    {
-      const size_type __n = _M_bkt_num(__obj);
-      _Node* __first = _M_buckets[__n];
-      
-      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
-       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
-         return pair<iterator, bool>(iterator(__cur, this), false);
-      
-      _Node* __tmp = _M_new_node(__obj);
-      __tmp->_M_next = __first;
-      _M_buckets[__n] = __tmp;
-      ++_M_num_elements;
-      return pair<iterator, bool>(iterator(__tmp, this), true);
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    insert_equal_noresize(const value_type& __obj)
-    {
-      const size_type __n = _M_bkt_num(__obj);
-      _Node* __first = _M_buckets[__n];
-      
-      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
-       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
-         {
-           _Node* __tmp = _M_new_node(__obj);
-           __tmp->_M_next = __cur->_M_next;
-           __cur->_M_next = __tmp;
-           ++_M_num_elements;
-           return iterator(__tmp, this);
-         }
-
-      _Node* __tmp = _M_new_node(__obj);
-      __tmp->_M_next = __first;
-      _M_buckets[__n] = __tmp;
-      ++_M_num_elements;
-      return iterator(__tmp, this);
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    find_or_insert(const value_type& __obj)
-    {
-      resize(_M_num_elements + 1);
-
-      size_type __n = _M_bkt_num(__obj);
-      _Node* __first = _M_buckets[__n];
-      
-      for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
-       if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
-         return __cur->_M_val;
-      
-      _Node* __tmp = _M_new_node(__obj);
-      __tmp->_M_next = __first;
-      _M_buckets[__n] = __tmp;
-      ++_M_num_elements;
-      return __tmp->_M_val;
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
-        typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    equal_range(const key_type& __key)
-    {
-      typedef pair<iterator, iterator> _Pii;
-      const size_type __n = _M_bkt_num_key(__key);
-
-      for (_Node* __first = _M_buckets[__n]; __first;
-          __first = __first->_M_next)
-       if (_M_equals(_M_get_key(__first->_M_val), __key))
-         {
-           for (_Node* __cur = __first->_M_next; __cur;
-                __cur = __cur->_M_next)
-             if (!_M_equals(_M_get_key(__cur->_M_val), __key))
-               return _Pii(iterator(__first, this), iterator(__cur, this));
-           for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
-             if (_M_buckets[__m])
-               return _Pii(iterator(__first, this),
-                           iterator(_M_buckets[__m], this));
-           return _Pii(iterator(__first, this), end());
-         }
-      return _Pii(end(), end());
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
-        typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    equal_range(const key_type& __key) const
-    {
-      typedef pair<const_iterator, const_iterator> _Pii;
-      const size_type __n = _M_bkt_num_key(__key);
-
-      for (const _Node* __first = _M_buckets[__n]; __first;
-          __first = __first->_M_next)
-       {
-         if (_M_equals(_M_get_key(__first->_M_val), __key))
-           {
-             for (const _Node* __cur = __first->_M_next; __cur;
-                  __cur = __cur->_M_next)
-               if (!_M_equals(_M_get_key(__cur->_M_val), __key))
-                 return _Pii(const_iterator(__first, this),
-                             const_iterator(__cur, this));
-             for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
-               if (_M_buckets[__m])
-                 return _Pii(const_iterator(__first, this),
-                             const_iterator(_M_buckets[__m], this));
-             return _Pii(const_iterator(__first, this), end());
-           }
-       }
-      return _Pii(end(), end());
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    erase(const key_type& __key)
-    {
-      const size_type __n = _M_bkt_num_key(__key);
-      _Node* __first = _M_buckets[__n];
-      size_type __erased = 0;
-      
-      if (__first)
-       {
-         _Node* __cur = __first;
-         _Node* __next = __cur->_M_next;
-         while (__next)
-           {
-             if (_M_equals(_M_get_key(__next->_M_val), __key))
-               {
-                 __cur->_M_next = __next->_M_next;
-                 _M_delete_node(__next);
-                 __next = __cur->_M_next;
-                 ++__erased;
-                 --_M_num_elements;
-               }
-             else
-               {
-                 __cur = __next;
-                 __next = __cur->_M_next;
-               }
-           }
-         if (_M_equals(_M_get_key(__first->_M_val), __key))
-           {
-             _M_buckets[__n] = __first->_M_next;
-             _M_delete_node(__first);
-             ++__erased;
-             --_M_num_elements;
-           }
-       }
-      return __erased;
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    erase(const iterator& __it)
-    {
-      _Node* __p = __it._M_cur;
-      if (__p)
-       {
-         const size_type __n = _M_bkt_num(__p->_M_val);
-         _Node* __cur = _M_buckets[__n];
-         
-         if (__cur == __p)
-           {
-             _M_buckets[__n] = __cur->_M_next;
-             _M_delete_node(__cur);
-             --_M_num_elements;
-           }
-         else
-           {
-             _Node* __next = __cur->_M_next;
-             while (__next)
-               {
-                 if (__next == __p)
-                   {
-                     __cur->_M_next = __next->_M_next;
-                     _M_delete_node(__next);
-                     --_M_num_elements;
-                     break;
-                   }
-                 else
-                   {
-                     __cur = __next;
-                     __next = __cur->_M_next;
-                   }
-               }
-           }
-       }
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    erase(iterator __first, iterator __last)
-    {
-      size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
-                                           : _M_buckets.size();
-
-      size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
-                                          : _M_buckets.size();
-
-      if (__first._M_cur == __last._M_cur)
-       return;
-      else if (__f_bucket == __l_bucket)
-       _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
-      else
-       {
-         _M_erase_bucket(__f_bucket, __first._M_cur, 0);
-         for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
-           _M_erase_bucket(__n, 0);
-         if (__l_bucket != _M_buckets.size())
-           _M_erase_bucket(__l_bucket, __last._M_cur);
-       }
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    inline void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    erase(const_iterator __first, const_iterator __last)
-    {
-      erase(iterator(const_cast<_Node*>(__first._M_cur),
-                    const_cast<hashtable*>(__first._M_ht)),
-           iterator(const_cast<_Node*>(__last._M_cur),
-                    const_cast<hashtable*>(__last._M_ht)));
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    inline void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    erase(const const_iterator& __it)
-    { erase(iterator(const_cast<_Node*>(__it._M_cur),
-                    const_cast<hashtable*>(__it._M_ht))); }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    resize(size_type __num_elements_hint)
-    {
-      const size_type __old_n = _M_buckets.size();
-      if (__num_elements_hint > __old_n)
-       {
-         const size_type __n = _M_next_size(__num_elements_hint);
-         if (__n > __old_n)
-           {
-             _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
-             try
-               {
-                 for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
-                   {
-                     _Node* __first = _M_buckets[__bucket];
-                     while (__first)
-                       {
-                         size_type __new_bucket = _M_bkt_num(__first->_M_val,
-                                                             __n);
-                         _M_buckets[__bucket] = __first->_M_next;
-                         __first->_M_next = __tmp[__new_bucket];
-                         __tmp[__new_bucket] = __first;
-                         __first = _M_buckets[__bucket];
-                       }
-                   }
-                 _M_buckets.swap(__tmp);
-               }
-             catch(...)
-               {
-                 for (size_type __bucket = 0; __bucket < __tmp.size();
-                      ++__bucket)
-                   {
-                     while (__tmp[__bucket])
-                       {
-                         _Node* __next = __tmp[__bucket]->_M_next;
-                         _M_delete_node(__tmp[__bucket]);
-                         __tmp[__bucket] = __next;
-                       }
-                   }
-                 __throw_exception_again;
-               }
-           }
-       }
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
-    {
-      _Node* __cur = _M_buckets[__n];
-      if (__cur == __first)
-       _M_erase_bucket(__n, __last);
-      else
-       {
-         _Node* __next;
-         for (__next = __cur->_M_next;
-              __next != __first;
-              __cur = __next, __next = __cur->_M_next)
-           ;
-         while (__next != __last)
-           {
-             __cur->_M_next = __next->_M_next;
-             _M_delete_node(__next);
-             __next = __cur->_M_next;
-             --_M_num_elements;
-           }
-       }
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    _M_erase_bucket(const size_type __n, _Node* __last)
-    {
-      _Node* __cur = _M_buckets[__n];
-      while (__cur != __last)
-       {
-         _Node* __next = __cur->_M_next;
-         _M_delete_node(__cur);
-         __cur = __next;
-         _M_buckets[__n] = __cur;
-         --_M_num_elements;
-       }
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    clear()
-    {
-      for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
-       {
-         _Node* __cur = _M_buckets[__i];
-         while (__cur != 0)
-           {
-             _Node* __next = __cur->_M_next;
-             _M_delete_node(__cur);
-             __cur = __next;
-           }
-         _M_buckets[__i] = 0;
-       }
-      _M_num_elements = 0;
-    }
-
-  template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
-    void
-    hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
-    _M_copy_from(const hashtable& __ht)
-    {
-      _M_buckets.clear();
-      _M_buckets.reserve(__ht._M_buckets.size());
-      _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
-      try
-       {
-         for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
-           const _Node* __cur = __ht._M_buckets[__i];
-           if (__cur)
-             {
-               _Node* __local_copy = _M_new_node(__cur->_M_val);
-               _M_buckets[__i] = __local_copy;
-               
-               for (_Node* __next = __cur->_M_next;
-                    __next;
-                    __cur = __next, __next = __cur->_M_next)
-                 {
-                   __local_copy->_M_next = _M_new_node(__next->_M_val);
-                   __local_copy = __local_copy->_M_next;
-                 }
-             }
-         }
-         _M_num_elements = __ht._M_num_elements;
-       }
-      catch(...)
-       {
-         clear();
-         __throw_exception_again;
-       }
-    }
-
-_GLIBCXX_END_NAMESPACE
-
-#endif
index 016d3eaed21fffc9cd71d3aa0eb896c9ac558371..3e3dcf75eb3606e647000cc555c78cf5c5545ebb 100644 (file)
 #  include <tr1_impl/unordered_map>
 #else
 #  define _GLIBCXX_INCLUDE_AS_CXX0X
+#if _GLIBCXX_DEBUG
+#  define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+#  define _GLIBCXX_END_NAMESPACE_TR1 }
+#  define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
 #  define _GLIBCXX_BEGIN_NAMESPACE_TR1
 #  define _GLIBCXX_END_NAMESPACE_TR1
-#  define _GLIBCXX_TR1
+#  define _GLIBCXX_TR1 
+#endif
 #  include <tr1_impl/unordered_map>
 #  undef _GLIBCXX_TR1
 #  undef _GLIBCXX_END_NAMESPACE_TR1
index dba781682ced798ee133cce181c434c163b9911b..daa64cd4a8e3169323e6f03f766601c637e34a5e 100644 (file)
 #  include <tr1_impl/unordered_set>
 #else
 #  define _GLIBCXX_INCLUDE_AS_CXX0X
+#if _GLIBCXX_DEBUG
+#  define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+#  define _GLIBCXX_END_NAMESPACE_TR1 }
+#  define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
 #  define _GLIBCXX_BEGIN_NAMESPACE_TR1
 #  define _GLIBCXX_END_NAMESPACE_TR1
-#  define _GLIBCXX_TR1
+#  define _GLIBCXX_TR1 
+#endif
 #  include <tr1_impl/unordered_set>
 #  undef _GLIBCXX_TR1
 #  undef _GLIBCXX_END_NAMESPACE_TR1
@@ -68,4 +74,8 @@
 #  undef _GLIBCXX_INCLUDE_AS_CXX0X
 #endif
 
+#ifdef _GLIBCXX_DEBUG
+# include <debug/unordered_set>
+#endif
+
 #endif // _GLIBCXX_UNORDERED_SET
similarity index 57%
rename from libstdc++-v3/testsuite/backward/header_deque_h.cc
rename to libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
index d3a7f2b0b1c875fc1b87d2c7abb584d1be67b304..a880bdc57a8596a65b56cded90e76e810ee835a1 100644 (file)
@@ -1,6 +1,7 @@
-// 2001-09-20 Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2007 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
 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 // USA.
 
-// backward header deque.h
+#include <string>
+#include <debug/unordered_map>
 
-#include <deque.h>
-#include <testsuite_hooks.h>
+using namespace __gnu_debug;
 
-// { dg-options "-Wno-deprecated" }
+using std::allocator;
+using std::equal_to;
+using std::hash;
+using std::pair;
+using std::string;
 
-int main(void)
-{
-  return 0;
-}
+template class unordered_map<string, float>;
+template class unordered_map<string, int,
+                            hash<string>, equal_to<string>, 
+                            allocator<pair<const string, int> > >;
+template class unordered_map<string, float,
+                            hash<string>, equal_to<string>, 
+                            allocator<char> >;
similarity index 75%
rename from libstdc++-v3/testsuite/backward/header_hashtable_h.cc
rename to libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc
index 4184f11014ffdc7dee3f1fe98246d9f159b49cee..fe2b9af4e131e3408a58164166e0e27f2063a753 100644 (file)
@@ -1,6 +1,7 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2007 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
 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 // USA.
 
-// backward header hashtable.h
+#include <string>
+#include <debug/unordered_map>
 
-#include <hashtable.h>
-#include <testsuite_hooks.h>
+using namespace __gnu_debug;
 
-// { dg-options "-Wno-deprecated" }
+using std::string;
 
-int main(void)
-{
-  return 0;
-}
+template class unordered_multimap<string, float>;
similarity index 76%
rename from libstdc++-v3/testsuite/backward/header_rope_h.cc
rename to libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc
index 19edfbbffcae17caa2987d4ac1855da749068ec6..3d09ef6e55143cbdcad92f348c37355990c4e695 100644 (file)
@@ -1,6 +1,7 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2007 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
 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 // USA.
 
-// backward header rope.h
+#include <string>
+#include <debug/unordered_set>
 
-#include <rope.h>
-#include <testsuite_hooks.h>
+using namespace __gnu_debug;
 
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
-  return 0;
-}
+template class unordered_multiset<int>;
similarity index 59%
rename from libstdc++-v3/testsuite/backward/header_slist_h.cc
rename to libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
index 3a59789061f208598fad356cccd60181f2974853..2894dff0edbe8d9a682bf5032ef6bd47f9db7e5e 100644 (file)
@@ -1,31 +1,26 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
 
-// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header slist.h
-
-#include <slist.h>
-#include <testsuite_hooks.h>
+#include <debug/unordered_set>
 
-// { dg-options "-Wno-deprecated" }
+using namespace __gnu_debug;
 
-int main(void)
-{
-  return 0;
-}
+template class unordered_set<int>;
similarity index 95%
rename from libstdc++-v3/testsuite/ext/hash_map/1.cc
rename to libstdc++-v3/testsuite/backward/hash_map/1.cc
index 2062cb01b57d4f55de1ef552bd93b35d931b4aec..faa97d6f2657ea935c93689b0bb6f69d4be2803a 100644 (file)
@@ -1,4 +1,6 @@
-// Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+// { dg-options "-Wno-deprecated" }
+
+// Copyright (C) 2002, 2005, 2007 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
@@ -20,7 +22,7 @@
 
 #include <cstdlib>
 #include <string>
-#include <ext/hash_map>
+#include <hash_map>
 #include <testsuite_hooks.h>
 
 namespace __gnu_cxx 
similarity index 90%
rename from libstdc++-v3/testsuite/ext/hash_map/14648.cc
rename to libstdc++-v3/testsuite/backward/hash_map/14648.cc
index 91f8240e150a9bfa675f0c8c0ca5f933c6ea2055..8c73b2d790d5f9e4e700039146c566adc97bf1cc 100644 (file)
@@ -1,4 +1,6 @@
-// Copyright (C) 2004, 2005 Free Software Foundation
+// { dg-options "-Wno-deprecated" }
+
+// Copyright (C) 2004, 2005, 2007 Free Software Foundation
 //
 // 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
@@ -17,7 +19,7 @@
 // USA.
 
 #include <iostream>
-#include <ext/hash_map> 
+#include <hash_map> 
 #include <ext/rope> 
 
 // libstdc++/14648
similarity index 95%
rename from libstdc++-v3/testsuite/ext/hash_map/23528.cc
rename to libstdc++-v3/testsuite/backward/hash_map/23528.cc
index e651e5b2d3d01749a324f6c886323f82cd354126..42908eb3134ee8fc72a863cc8f3bf95e3a515666 100644 (file)
@@ -1,3 +1,6 @@
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
 // Copyright (C) 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -16,9 +19,7 @@
 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 // USA.
 
-// { dg-do compile }
-
-#include <ext/hash_map>
+#include <hash_map>
 
 // libstdc++/23528
 void test01()
similarity index 92%
rename from libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc
rename to libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc
index 85f1ba258e43117fa6aa61864dfe47d0a201f63f..84df423ea616f136a796a5df25bc5c3981da462d 100644 (file)
@@ -1,4 +1,7 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
+// Copyright (C) 2004, 2007 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
@@ -27,8 +30,6 @@
 
 // This file tests explicit instantiation of library containers
 
-#include <ext/hash_map>
-
-// { dg-do compile }
+#include <hash_map>
 
 template class __gnu_cxx::hash_map<int, char>;
similarity index 90%
rename from libstdc++-v3/testsuite/ext/hash_set/1.cc
rename to libstdc++-v3/testsuite/backward/hash_set/1.cc
index da1617cd9ffb2ef02a3f7c26460ca2e82f2f92ca..b54f022b25744633071a24c702bc8f2bc09f9000 100644 (file)
@@ -1,7 +1,9 @@
+// { dg-options "-Wno-deprecated" }
+
 // 2002-04-28  Paolo Carlini  <pcarlini@unitus.it>
 //             Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
 
-// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2004, 2005, 2007 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
@@ -21,7 +23,7 @@
 
 // hash_set (SGI extension)
 
-#include <ext/hash_set>
+#include <hash_set>
 
 void
 test01()
similarity index 96%
rename from libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc
rename to libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc
index 4f03e49af5cdde65132356a0abda9977d4915692..0e9a37569937bb6ab6dd2d615459854516dff036 100644 (file)
@@ -1,6 +1,8 @@
+// { dg-options "-Wno-deprecated" }
+
 // 2004-07-26  Matt Austern  <austern@apple.com>
 //
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2007 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
@@ -27,7 +29,7 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-#include <ext/hash_set>
+#include <hash_set>
 #include <functional>
 #include <iterator>
 #include <testsuite_allocator.h>
similarity index 92%
rename from libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc
rename to libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc
index 9d6f398d4a9cfd12f35fd0b12495f2d55cc24831..8d01bae374f8523e05ff4ba7918bf58cf9e16d5a 100644 (file)
@@ -1,4 +1,7 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
+// Copyright (C) 2004, 2007 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
@@ -27,8 +30,6 @@
 
 // This file tests explicit instantiation of library containers
 
-#include <ext/hash_set>
-
-// { dg-do compile }
+#include <hash_set>
 
 template class __gnu_cxx::hash_set<int>;
diff --git a/libstdc++-v3/testsuite/backward/header_hash_map_h.cc b/libstdc++-v3/testsuite/backward/header_hash_map_h.cc
deleted file mode 100644 (file)
index cede092..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header hash_map.h
-
-#include <hash_map.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_hash_set_h.cc b/libstdc++-v3/testsuite/backward/header_hash_set_h.cc
deleted file mode 100644 (file)
index 7d32b03..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header hash_set.h
-
-#include <hash_set.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_iterator_h.cc b/libstdc++-v3/testsuite/backward/header_iterator_h.cc
deleted file mode 100644 (file)
index 4f301bb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2001-09-04 Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header iterator.h
-
-#include <iterator.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc b/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc
deleted file mode 100644 (file)
index 4b177b2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//  2002-03-15  Philipp Thomas  <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header tempbuf.h
-
-#include <tempbuf.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
-  return 0;
-}
index b9d5aa19a311fe4ed1b88e50c6252c6b512f1fff..a3f82ba8a75b405a629ba7c25bde65a6910c915f 100644 (file)
@@ -49,7 +49,6 @@
 
 #include <string>
 #include <tr1/unordered_map>
-#include <ext/hash_map>
 #include <ext/pb_ds/detail/type_utils.hpp>
 #include <ext/pb_ds/detail/standard_policies.hpp>
 #include <native_type/assoc/native_hash_tag.hpp>