summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-18 15:22:58 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-18 15:22:58 +0000
commit049497a3693e24774fc6d3a78c4dd19f1dafecdd (patch)
tree5c6283d7c5bcdf986bf35763b76c14af3d93e82a /libstdc++-v3
parent24239da3ba86c30342ed978bad3febffd246894c (diff)
downloadgcc-049497a3693e24774fc6d3a78c4dd19f1dafecdd.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog109
-rw-r--r--libstdc++-v3/config.h.in3
-rw-r--r--libstdc++-v3/docs/doxygen/Intro.311
-rw-r--r--libstdc++-v3/docs/doxygen/user.cfg.in6
-rw-r--r--libstdc++-v3/docs/html/debug.html47
-rw-r--r--libstdc++-v3/docs/html/ext/howto.html27
-rw-r--r--libstdc++-v3/docs/html/faq/index.html14
-rw-r--r--libstdc++-v3/include/Makefile.am52
-rw-r--r--libstdc++-v3/include/Makefile.in51
-rw-r--r--libstdc++-v3/include/backward/algo.h145
-rw-r--r--libstdc++-v3/include/backward/algobase.h91
-rw-r--r--libstdc++-v3/include/backward/alloc.h52
-rw-r--r--libstdc++-v3/include/backward/backward_warning.h16
-rw-r--r--libstdc++-v3/include/backward/bvector.h64
-rw-r--r--libstdc++-v3/include/backward/complex.h39
-rw-r--r--libstdc++-v3/include/backward/defalloc.h117
-rw-r--r--libstdc++-v3/include/backward/deque.h66
-rw-r--r--libstdc++-v3/include/backward/fstream.h48
-rw-r--r--libstdc++-v3/include/backward/function.h126
-rw-r--r--libstdc++-v3/include/backward/hash_fun.h (renamed from libstdc++-v3/include/ext/hash_fun.h)2
-rw-r--r--libstdc++-v3/include/backward/hash_map (renamed from libstdc++-v3/include/ext/hash_map)13
-rw-r--r--libstdc++-v3/include/backward/hash_map.h68
-rw-r--r--libstdc++-v3/include/backward/hash_set (renamed from libstdc++-v3/include/ext/hash_set)13
-rw-r--r--libstdc++-v3/include/backward/hash_set.h69
-rw-r--r--libstdc++-v3/include/backward/hashtable.h1086
-rw-r--r--libstdc++-v3/include/backward/heap.h67
-rw-r--r--libstdc++-v3/include/backward/iomanip.h66
-rw-r--r--libstdc++-v3/include/backward/iostream.h56
-rw-r--r--libstdc++-v3/include/backward/istream.h34
-rw-r--r--libstdc++-v3/include/backward/iterator.h187
-rw-r--r--libstdc++-v3/include/backward/list.h66
-rw-r--r--libstdc++-v3/include/backward/map.h65
-rw-r--r--libstdc++-v3/include/backward/multimap.h65
-rw-r--r--libstdc++-v3/include/backward/multiset.h65
-rw-r--r--libstdc++-v3/include/backward/new.h42
-rw-r--r--libstdc++-v3/include/backward/ostream.h34
-rw-r--r--libstdc++-v3/include/backward/pair.h66
-rw-r--r--libstdc++-v3/include/backward/queue.h37
-rw-r--r--libstdc++-v3/include/backward/rope.h56
-rw-r--r--libstdc++-v3/include/backward/set.h65
-rw-r--r--libstdc++-v3/include/backward/slist.h52
-rw-r--r--libstdc++-v3/include/backward/stack.h68
-rw-r--r--libstdc++-v3/include/backward/stream.h34
-rw-r--r--libstdc++-v3/include/backward/streambuf.h36
-rw-r--r--libstdc++-v3/include/backward/tempbuf.h74
-rw-r--r--libstdc++-v3/include/backward/tree.h52
-rw-r--r--libstdc++-v3/include/backward/vector.h66
-rw-r--r--libstdc++-v3/include/bits/c++config42
-rw-r--r--libstdc++-v3/include/debug/debug.h6
-rw-r--r--libstdc++-v3/include/debug/hash_map42
-rw-r--r--libstdc++-v3/include/debug/hash_map.h284
-rw-r--r--libstdc++-v3/include/debug/hash_multimap.h268
-rw-r--r--libstdc++-v3/include/debug/hash_multiset.h243
-rw-r--r--libstdc++-v3/include/debug/hash_set42
-rw-r--r--libstdc++-v3/include/debug/safe_association.h (renamed from libstdc++-v3/include/debug/hash_set.h)211
-rw-r--r--libstdc++-v3/include/debug/unordered_map199
-rw-r--r--libstdc++-v3/include/debug/unordered_set192
-rw-r--r--libstdc++-v3/include/ext/hashtable.h1130
-rw-r--r--libstdc++-v3/include/std/unordered_map8
-rw-r--r--libstdc++-v3/include/std/unordered_set12
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc (renamed from libstdc++-v3/testsuite/backward/header_deque_h.cc)28
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc (renamed from libstdc++-v3/testsuite/backward/header_hashtable_h.cc)18
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc (renamed from libstdc++-v3/testsuite/backward/header_rope_h.cc)18
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc (renamed from libstdc++-v3/testsuite/backward/header_slist_h.cc)29
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/1.cc (renamed from libstdc++-v3/testsuite/ext/hash_map/1.cc)6
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/14648.cc (renamed from libstdc++-v3/testsuite/ext/hash_map/14648.cc)6
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/23528.cc (renamed from libstdc++-v3/testsuite/ext/hash_map/23528.cc)7
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc (renamed from libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc)9
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/1.cc (renamed from libstdc++-v3/testsuite/ext/hash_set/1.cc)6
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc (renamed from libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc)6
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc (renamed from libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc)9
-rw-r--r--libstdc++-v3/testsuite/backward/header_hash_map_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_hash_set_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_iterator_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_tempbuf_h.cc31
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp1
76 files changed, 1843 insertions, 4791 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7fb26d327d8..7014fbcdd42 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 4a9ffb763cf..1c7bcd3f9cc 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -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
diff --git a/libstdc++-v3/docs/doxygen/Intro.3 b/libstdc++-v3/docs/doxygen/Intro.3
index 48cb31f87f1..cb3ff2e4a1e 100644
--- a/libstdc++-v3/docs/doxygen/Intro.3
+++ b/libstdc++-v3/docs/doxygen/Intro.3
@@ -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>
diff --git a/libstdc++-v3/docs/doxygen/user.cfg.in b/libstdc++-v3/docs/doxygen/user.cfg.in
index 6b8cca1c871..20a041e0f99 100644
--- a/libstdc++-v3/docs/doxygen/user.cfg.in
+++ b/libstdc++-v3/docs/doxygen/user.cfg.in
@@ -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 \
diff --git a/libstdc++-v3/docs/html/debug.html b/libstdc++-v3/docs/html/debug.html
index 6013115fe13..60e8418a634 100644
--- a/libstdc++-v3/docs/html/debug.html
+++ b/libstdc++-v3/docs/html/debug.html
@@ -231,29 +231,36 @@
<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>
@@ -308,10 +315,10 @@
<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>
diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html
index 73881ed0296..cb544aa24c0 100644
--- a/libstdc++-v3/docs/html/ext/howto.html
+++ b/libstdc++-v3/docs/html/ext/howto.html
@@ -63,27 +63,28 @@
<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
diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html
index 298ae37cdb6..e38732e5833 100644
--- a/libstdc++-v3/docs/html/faq/index.html
+++ b/libstdc++-v3/docs/html/faq/index.html
@@ -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>
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 2e2609c23d2..e1d9e0b6071 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -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
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index d1db21d5509..c4a65c51f03 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -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
index 247460105a4..00000000000
--- a/libstdc++-v3/include/backward/algo.h
+++ /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
index 289e9886d1c..00000000000
--- a/libstdc++-v3/include/backward/algobase.h
+++ /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
index 40a0af1f999..00000000000
--- a/libstdc++-v3/include/backward/alloc.h
+++ /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
diff --git a/libstdc++-v3/include/backward/backward_warning.h b/libstdc++-v3/include/backward/backward_warning.h
index 80eabfe878c..5954bd02953 100644
--- a/libstdc++-v3/include/backward/backward_warning.h
+++ b/libstdc++-v3/include/backward/backward_warning.h
@@ -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
@@ -30,10 +30,16 @@
#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
index 9a2c44da144..00000000000
--- a/libstdc++-v3/include/backward/bvector.h
+++ /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
index 7972cf7303f..00000000000
--- a/libstdc++-v3/include/backward/complex.h
+++ /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
index ffa9b16828b..00000000000
--- a/libstdc++-v3/include/backward/defalloc.h
+++ /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
index a4a6b418117..00000000000
--- a/libstdc++-v3/include/backward/deque.h
+++ /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
index 92835f9b844..00000000000
--- a/libstdc++-v3/include/backward/fstream.h
+++ /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
index b5be371d8cd..00000000000
--- a/libstdc++-v3/include/backward/function.h
+++ /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 */
diff --git a/libstdc++-v3/include/ext/hash_fun.h b/libstdc++-v3/include/backward/hash_fun.h
index 16c04580754..e6771d77e28 100644
--- a/libstdc++-v3/include/ext/hash_fun.h
+++ b/libstdc++-v3/include/backward/hash_fun.h
@@ -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).
*/
diff --git a/libstdc++-v3/include/ext/hash_map b/libstdc++-v3/include/backward/hash_map
index b2d937f277a..6b10cda6e3f 100644
--- a/libstdc++-v3/include/ext/hash_map
+++ b/libstdc++-v3/include/backward/hash_map
@@ -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).
*/
@@ -61,11 +61,12 @@
#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
index aa1452200a3..00000000000
--- a/libstdc++-v3/include/backward/hash_map.h
+++ /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 */
diff --git a/libstdc++-v3/include/ext/hash_set b/libstdc++-v3/include/backward/hash_set
index 79d605fa955..59c88c9e30a 100644
--- a/libstdc++-v3/include/ext/hash_set
+++ b/libstdc++-v3/include/backward/hash_set
@@ -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).
*/
@@ -61,11 +61,12 @@
#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
index c2c6e393e42..00000000000
--- a/libstdc++-v3/include/backward/hash_set.h
+++ /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 */
-
diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
index 7b7511b832c..7efb8ea5b12 100644
--- a/libstdc++-v3/include/backward/hashtable.h
+++ b/libstdc++-v3/include/backward/hashtable.h
@@ -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
@@ -53,20 +54,1077 @@
*
*/
-/* 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
index ef2e68475aa..00000000000
--- a/libstdc++-v3/include/backward/heap.h
+++ /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
index a4099a7bec4..00000000000
--- a/libstdc++-v3/include/backward/iomanip.h
+++ /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
index ed275ffa98d..00000000000
--- a/libstdc++-v3/include/backward/iostream.h
+++ /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
index b1c55d18991..00000000000
--- a/libstdc++-v3/include/backward/istream.h
+++ /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
index 89496fb8fff..00000000000
--- a/libstdc++-v3/include/backward/iterator.h
+++ /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
index d70a6e4ae7d..00000000000
--- a/libstdc++-v3/include/backward/list.h
+++ /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
index 2ff3cec667e..00000000000
--- a/libstdc++-v3/include/backward/map.h
+++ /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
index 515d2995049..00000000000
--- a/libstdc++-v3/include/backward/multimap.h
+++ /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
index 1f857ae6eb0..00000000000
--- a/libstdc++-v3/include/backward/multiset.h
+++ /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
index 9cfbab27fe6..00000000000
--- a/libstdc++-v3/include/backward/new.h
+++ /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
index 07ef9b0f2b3..00000000000
--- a/libstdc++-v3/include/backward/ostream.h
+++ /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
index 4985bcbfdd2..00000000000
--- a/libstdc++-v3/include/backward/pair.h
+++ /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
index da7505c28d1..00000000000
--- a/libstdc++-v3/include/backward/queue.h
+++ /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
index 71e88153267..00000000000
--- a/libstdc++-v3/include/backward/rope.h
+++ /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
index 3c6a390cf49..00000000000
--- a/libstdc++-v3/include/backward/set.h
+++ /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
index 9b9a43d3f0d..00000000000
--- a/libstdc++-v3/include/backward/slist.h
+++ /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
index 07df41769e0..00000000000
--- a/libstdc++-v3/include/backward/stack.h
+++ /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
index c137601e676..00000000000
--- a/libstdc++-v3/include/backward/stream.h
+++ /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
index bac24495a05..00000000000
--- a/libstdc++-v3/include/backward/streambuf.h
+++ /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
index af6e57daa3b..00000000000
--- a/libstdc++-v3/include/backward/tempbuf.h
+++ /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
index 88a2f1d7c82..00000000000
--- a/libstdc++-v3/include/backward/tree.h
+++ /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
index 8cd8dd0f360..00000000000
--- a/libstdc++-v3/include/backward/vector.h
+++ /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 */
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 262834560d1..51b8f2dde99 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -65,12 +65,6 @@
namespace tr1 { }
}
-
- namespace __gnu_cxx
- {
- namespace __debug { }
- namespace __norm { }
- }
*/
// Macros for activating various namespace association modes.
@@ -100,9 +94,6 @@
// _GLIBCXX_STD
// _GLIBCXX_STD_D
// _GLIBCXX_STD_P
-// _GLIBCXX_EXT
-// _GLIBCXX_EXT_D
-// _GLIBCXX_EXT_P
//
// Macros for enclosing namepaces and possibly nested namespaces.
@@ -116,9 +107,6 @@
# 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) {
@@ -129,7 +117,6 @@
# 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
@@ -139,9 +126,6 @@
# 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
@@ -152,9 +136,6 @@
# 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
@@ -165,9 +146,6 @@
# 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.
diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h
index 46e4b6bf09e..32f96a37bed 100644
--- a/libstdc++-v3/include/debug/debug.h
+++ b/libstdc++-v3/include/debug/debug.h
@@ -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
index f44586b0ab6..00000000000
--- a/libstdc++-v3/include/debug/hash_map
+++ /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
index aeac90b8a13..00000000000
--- a/libstdc++-v3/include/debug/hash_map.h
+++ /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
index 985fbc83030..00000000000
--- a/libstdc++-v3/include/debug/hash_multimap.h
+++ /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
index 11efb5b6846..00000000000
--- a/libstdc++-v3/include/debug/hash_multiset.h
+++ /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
index 4b98fefab1f..00000000000
--- a/libstdc++-v3/include/debug/hash_set
+++ /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
diff --git a/libstdc++-v3/include/debug/hash_set.h b/libstdc++-v3/include/debug/safe_association.h
index 9178063289b..dcb9ab44dbc 100644
--- a/libstdc++-v3/include/debug/hash_set.h
+++ b/libstdc++-v3/include/debug/safe_association.h
@@ -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
@@ -28,110 +28,110 @@
// 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
index 00000000000..a88a972aa7f
--- /dev/null
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -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
index 00000000000..a49b4b06019
--- /dev/null
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -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
index e73b7df72c4..00000000000
--- a/libstdc++-v3/include/ext/hashtable.h
+++ /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
diff --git a/libstdc++-v3/include/std/unordered_map b/libstdc++-v3/include/std/unordered_map
index 016d3eaed21..3e3dcf75eb3 100644
--- a/libstdc++-v3/include/std/unordered_map
+++ b/libstdc++-v3/include/std/unordered_map
@@ -58,9 +58,15 @@
# 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
diff --git a/libstdc++-v3/include/std/unordered_set b/libstdc++-v3/include/std/unordered_set
index dba781682ce..daa64cd4a8e 100644
--- a/libstdc++-v3/include/std/unordered_set
+++ b/libstdc++-v3/include/std/unordered_set
@@ -58,9 +58,15 @@
# 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
diff --git a/libstdc++-v3/testsuite/backward/header_deque_h.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
index d3a7f2b0b1c..a880bdc57a8 100644
--- a/libstdc++-v3/testsuite/backward/header_deque_h.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
@@ -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
@@ -18,14 +19,21 @@
// 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> >;
diff --git a/libstdc++-v3/testsuite/backward/header_hashtable_h.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc
index 4184f11014f..fe2b9af4e13 100644
--- a/libstdc++-v3/testsuite/backward/header_hashtable_h.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc
@@ -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
@@ -18,14 +19,11 @@
// 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>;
diff --git a/libstdc++-v3/testsuite/backward/header_rope_h.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc
index 19edfbbffca..3d09ef6e551 100644
--- a/libstdc++-v3/testsuite/backward/header_rope_h.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc
@@ -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
@@ -18,14 +19,9 @@
// 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>;
diff --git a/libstdc++-v3/testsuite/backward/header_slist_h.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
index 3a59789061f..2894dff0edb 100644
--- a/libstdc++-v3/testsuite/backward/header_slist_h.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
@@ -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>;
diff --git a/libstdc++-v3/testsuite/ext/hash_map/1.cc b/libstdc++-v3/testsuite/backward/hash_map/1.cc
index 2062cb01b57..faa97d6f265 100644
--- a/libstdc++-v3/testsuite/ext/hash_map/1.cc
+++ b/libstdc++-v3/testsuite/backward/hash_map/1.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/hash_map/14648.cc b/libstdc++-v3/testsuite/backward/hash_map/14648.cc
index 91f8240e150..8c73b2d790d 100644
--- a/libstdc++-v3/testsuite/ext/hash_map/14648.cc
+++ b/libstdc++-v3/testsuite/backward/hash_map/14648.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/hash_map/23528.cc b/libstdc++-v3/testsuite/backward/hash_map/23528.cc
index e651e5b2d3d..42908eb3134 100644
--- a/libstdc++-v3/testsuite/ext/hash_map/23528.cc
+++ b/libstdc++-v3/testsuite/backward/hash_map/23528.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc
index 85f1ba258e4..84df423ea61 100644
--- a/libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc
@@ -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>;
diff --git a/libstdc++-v3/testsuite/ext/hash_set/1.cc b/libstdc++-v3/testsuite/backward/hash_set/1.cc
index da1617cd9ff..b54f022b257 100644
--- a/libstdc++-v3/testsuite/ext/hash_set/1.cc
+++ b/libstdc++-v3/testsuite/backward/hash_set/1.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc b/libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc
index 4f03e49af5c..0e9a3756993 100644
--- a/libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc
+++ b/libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc
@@ -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>
diff --git a/libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc
index 9d6f398d4a9..8d01bae374f 100644
--- a/libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc
@@ -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
index cede092eeb4..00000000000
--- a/libstdc++-v3/testsuite/backward/header_hash_map_h.cc
+++ /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
index 7d32b03ed89..00000000000
--- a/libstdc++-v3/testsuite/backward/header_hash_set_h.cc
+++ /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
index 4f301bbb5ff..00000000000
--- a/libstdc++-v3/testsuite/backward/header_iterator_h.cc
+++ /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
index 4b177b2ac5a..00000000000
--- a/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc
+++ /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;
-}
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
index b9d5aa19a31..a3f82ba8a75 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
@@ -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>