summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-09 15:21:54 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-09 15:21:54 +0000
commit27e0321aadb8c2c656af795612836cf896f0557d (patch)
tree7624fc2d71c047c04fe2c3c927b645f19760fdee /libstdc++-v3
parentcf4848768d6fbbbaec367eb8107504f1803091e2 (diff)
downloadgcc-27e0321aadb8c2c656af795612836cf896f0557d.tar.gz
2009-10-09 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 152583 after the LTO merge inside trunk. [during merge with trunk 152583 the version information from GCC is used, not the checksum of the executable!] * gcc/melt-runtime.h (melt_gccversionstr): added extern declaration. * gcc/melt-runtime.c: Moved the #include before everything else. Updated comment NOTE about gengtype - which is now compatible with the trunk's. (melt_gccversionstr): added declaration. (load_checked_dynamic_module_index): use a gcc version string in modules, not a checksum of the executable. (melt_really_initialize): get a second argument for the gcc version string. Initialize melt_gccversionstr with it. (plugin_init): Build the gccversionstr out of gcc_version structure. (melt_initialize): calls melt_really_initialize with version_string. (melt_output_cfile_decl_impl): generates a genversionstr_melt instead of a genchecksum_melt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@152591 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog215
-rw-r--r--libstdc++-v3/acinclude.m438
-rw-r--r--libstdc++-v3/config.h.in4
-rw-r--r--libstdc++-v3/config/abi/pre/gnu.ver25
-rwxr-xr-xlibstdc++-v3/configure34
-rw-r--r--libstdc++-v3/configure.ac1
-rw-r--r--libstdc++-v3/doc/Makefile.am2
-rw-r--r--libstdc++-v3/doc/Makefile.in2
-rw-r--r--libstdc++-v3/doc/doxygen/user.cfg.in21
-rw-r--r--libstdc++-v3/doc/html/api.html2
-rw-r--r--libstdc++-v3/doc/html/index.html2
-rw-r--r--libstdc++-v3/doc/html/manual/abi.html20
-rw-r--r--libstdc++-v3/doc/html/manual/algorithms.html2
-rw-r--r--libstdc++-v3/doc/html/manual/api.html4
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_contributing.html8
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_free.html2
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_gpl.html4
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_porting.html8
-rw-r--r--libstdc++-v3/doc/html/manual/backwards.html48
-rw-r--r--libstdc++-v3/doc/html/manual/bitmap_allocator.html6
-rw-r--r--libstdc++-v3/doc/html/manual/bitset.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01ix01.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02pr01.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt09pr02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html22
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html8
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html122
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html10
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html18
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html51
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html68
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html528
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html (renamed from libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html)4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html (renamed from libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html)4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html (renamed from libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html)4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html (renamed from libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html)4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12pr03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bugs.html5
-rw-r--r--libstdc++-v3/doc/html/manual/codecvt.html20
-rw-r--r--libstdc++-v3/doc/html/manual/containers.html2
-rw-r--r--libstdc++-v3/doc/html/manual/debug.html16
-rw-r--r--libstdc++-v3/doc/html/manual/diagnostics.html2
-rw-r--r--libstdc++-v3/doc/html/manual/documentation_style.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_algorithms.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_allocators.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_concurrency.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_containers.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_demangling.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_io.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_iterators.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_numerics.html6
-rw-r--r--libstdc++-v3/doc/html/manual/ext_utilities.html6
-rw-r--r--libstdc++-v3/doc/html/manual/extensions.html4
-rw-r--r--libstdc++-v3/doc/html/manual/facets.html16
-rw-r--r--libstdc++-v3/doc/html/manual/intro.html4
-rw-r--r--libstdc++-v3/doc/html/manual/io.html2
-rw-r--r--libstdc++-v3/doc/html/manual/io_and_c.html2
-rw-r--r--libstdc++-v3/doc/html/manual/iterators.html2
-rw-r--r--libstdc++-v3/doc/html/manual/locales.html14
-rw-r--r--libstdc++-v3/doc/html/manual/localization.html2
-rw-r--r--libstdc++-v3/doc/html/manual/memory.html20
-rw-r--r--libstdc++-v3/doc/html/manual/messages.html18
-rw-r--r--libstdc++-v3/doc/html/manual/numerics.html2
-rw-r--r--libstdc++-v3/doc/html/manual/parallel_mode.html4
-rw-r--r--libstdc++-v3/doc/html/manual/profile_mode.html143
-rw-r--r--libstdc++-v3/doc/html/manual/shared_ptr.html22
-rw-r--r--libstdc++-v3/doc/html/manual/spine.html8
-rw-r--r--libstdc++-v3/doc/html/manual/status.html40
-rw-r--r--libstdc++-v3/doc/html/manual/strings.html2
-rw-r--r--libstdc++-v3/doc/html/manual/support.html2
-rw-r--r--libstdc++-v3/doc/html/manual/using.html2
-rw-r--r--libstdc++-v3/doc/html/manual/using_headers.html13
-rw-r--r--libstdc++-v3/doc/html/manual/utilities.html2
-rw-r--r--libstdc++-v3/doc/html/spine.html4
-rw-r--r--libstdc++-v3/doc/xml/manual/debug.xml58
-rw-r--r--libstdc++-v3/doc/xml/manual/extensions.xml24
-rw-r--r--libstdc++-v3/doc/xml/manual/intro.xml5
-rw-r--r--libstdc++-v3/doc/xml/manual/profile_mode.xml1718
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml299
-rw-r--r--libstdc++-v3/doc/xml/manual/using.xml51
-rw-r--r--libstdc++-v3/include/Makefile.am68
-rw-r--r--libstdc++-v3/include/Makefile.in72
-rw-r--r--libstdc++-v3/include/backward/hash_map4
-rw-r--r--libstdc++-v3/include/backward/hash_set4
-rw-r--r--libstdc++-v3/include/bits/c++config40
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h87
-rw-r--r--libstdc++-v3/include/decimal/decimal482
-rw-r--r--libstdc++-v3/include/decimal/decimal.h519
-rw-r--r--libstdc++-v3/include/ext/bitmap_allocator.h122
-rw-r--r--libstdc++-v3/include/profile/base.h68
-rw-r--r--libstdc++-v3/include/profile/bitset345
-rw-r--r--libstdc++-v3/include/profile/deque420
-rw-r--r--libstdc++-v3/include/profile/hashtable.h1151
-rw-r--r--libstdc++-v3/include/profile/impl/profiler.h326
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_container_size.h250
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hash_func.h192
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hashtable_size.h115
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h305
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_node.h172
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_state.h107
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_trace.h564
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_vector_size.h112
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_vector_to_list.h318
-rw-r--r--libstdc++-v3/include/profile/list520
-rw-r--r--libstdc++-v3/include/profile/map41
-rw-r--r--libstdc++-v3/include/profile/map.h489
-rw-r--r--libstdc++-v3/include/profile/multimap.h363
-rw-r--r--libstdc++-v3/include/profile/multiset.h363
-rw-r--r--libstdc++-v3/include/profile/set41
-rw-r--r--libstdc++-v3/include/profile/set.h367
-rw-r--r--libstdc++-v3/include/profile/unordered_map498
-rw-r--r--libstdc++-v3/include/profile/unordered_set480
-rw-r--r--libstdc++-v3/include/profile/vector369
-rw-r--r--libstdc++-v3/include/std/bitset4
-rw-r--r--libstdc++-v3/include/std/deque4
-rw-r--r--libstdc++-v3/include/std/list4
-rw-r--r--libstdc++-v3/include/std/map4
-rw-r--r--libstdc++-v3/include/std/set4
-rw-r--r--libstdc++-v3/include/std/tuple3
-rw-r--r--libstdc++-v3/include/std/unordered_map6
-rw-r--r--libstdc++-v3/include/std/unordered_set5
-rw-r--r--libstdc++-v3/include/std/vector6
-rw-r--r--libstdc++-v3/include/tr1_impl/hashtable3
-rw-r--r--libstdc++-v3/libsupc++/exception16
-rwxr-xr-xlibstdc++-v3/scripts/create_testsuite_files2
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cons/41530.cc34
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc8
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/profile/hash_map.cc22
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/profile/unordered.cc47
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc18
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc8
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc56
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc79
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc64
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable.cc59
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable2.cc62
-rw-r--r--libstdc++-v3/testsuite/Makefile.am16
-rw-r--r--libstdc++-v3/testsuite/Makefile.in16
-rw-r--r--libstdc++-v3/testsuite/decimal/binary-arith.cc372
-rw-r--r--libstdc++-v3/testsuite/decimal/cast_neg.cc62
-rw-r--r--libstdc++-v3/testsuite/decimal/comparison.cc546
-rw-r--r--libstdc++-v3/testsuite/decimal/compound-assignment-memfunc.cc250
-rw-r--r--libstdc++-v3/testsuite/decimal/compound-assignment.cc248
-rw-r--r--libstdc++-v3/testsuite/decimal/conversion-from-float.cc101
-rw-r--r--libstdc++-v3/testsuite/decimal/conversion-from-integral.cc193
-rw-r--r--libstdc++-v3/testsuite/decimal/conversion-to-generic-float.cc105
-rw-r--r--libstdc++-v3/testsuite/decimal/conversion-to-integral.cc85
-rw-r--r--libstdc++-v3/testsuite/decimal/ctor.cc65
-rw-r--r--libstdc++-v3/testsuite/decimal/incdec-memfunc.cc181
-rw-r--r--libstdc++-v3/testsuite/decimal/incdec.cc179
-rw-r--r--libstdc++-v3/testsuite/decimal/make-decimal.cc132
-rw-r--r--libstdc++-v3/testsuite/decimal/mixed-mode_neg.cc206
-rw-r--r--libstdc++-v3/testsuite/decimal/operator_neg.cc160
-rw-r--r--libstdc++-v3/testsuite/decimal/unary-arith.cc93
-rw-r--r--libstdc++-v3/testsuite/ext/profile/all.cc50
-rw-r--r--libstdc++-v3/testsuite/ext/profile/mh.cc66
-rw-r--r--libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc26
-rw-r--r--libstdc++-v3/testsuite/lib/dg-options.exp9
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp55
-rw-r--r--libstdc++-v3/testsuite/libstdc++-dg/conformance.exp1
164 files changed, 16602 insertions, 458 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 860b2000214..c81985de203 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,14 +1,211 @@
+2009-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/ext/bitmap_allocator.h: Minor clean-ups.
+
+2009-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * config/abi/pre/gnu.ver: Adjust exports.
+
+2009-10-07 Phil Muldoon <pmuldoon@redhat.com>
+
+ * doc/xml/manual/debug.xml: Rewrite and expand GDB Python
+ pretty-printer section.
+
+2009-10-07 Chris Jefferson <chris@bubblescope.net>
+
+ * testsuite/25_algorithms/rotate/moveable2.cc: New.
+
+2009-10-06 Janis Johnson <janis187@us.ibm.com>
+
+ * testsuite/decimal/binary-arith.cc: Fix directive to skip test.
+ * testsuite/decimal/cast_neg.cc: Ditto.
+ * testsuite/decimal/comparison.cc: Ditto.
+ * testsuite/decimal/compound-assignment.cc: Ditto.
+ * testsuite/decimal/compound-assignment-memfunc.cc: Ditto.
+ * testsuite/decimal/conversion-from-float.cc: Ditto.
+ * testsuite/decimal/conversion-from-integral.cc: Ditto.
+ * testsuite/decimal/conversion-to-generic-float.cc: Ditto.
+ * testsuite/decimal/conversion-to-integral.cc: Ditto.
+ * testsuite/decimal/ctor.cc: Ditto.
+ * testsuite/decimal/incdec.cc: Ditto.
+ * testsuite/decimal/incdec-memfunc.cc: Ditto.
+ * testsuite/decimal/make-decimal.cc: Ditto.
+ * testsuite/decimal/mixed-mode_neg.cc: Ditto.
+ * testsuite/decimal/operator_neg.cc: Ditto.
+ * testsuite/decimal/unary-arith.cc: Ditto.
+
+2009-10-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/html/*: Regenerate.
+
+2009-10-05 John Bytheway <jbytheway@gmail.com>
+
+ PR libstdc++/41530
+ * include/std/tuple (_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&)):
+ Fix to just move.
+ * testsuite/20_util/tuple/cons/41530.cc: New.
+
+2009-10-05 Phil Muldoon <pmuldoon@redhat.com>
+
+ * doc/xml/manual/debug.xml: Add narrative for GDB Python pretty
+ printers. Add links to GDB wiki/online manual.
+
+2009-10-05 Benjamin Kosnik <bkoz@redhat.com>
+ Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ * include/decimal/decimal: Warn if decimal floating point types
+ are not available.
+ * acinclude.m4 (GLIBCXX_ENABLE_DECIMAL_FLOAT): New.
+ * configure.ac: Use it.
+ * configure: Regenerate.
+ * config.h.in: Regenerate.
+
+2009-10-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am: Remove stray line break.
+
+ * include/decimal/decimal: Brief class doxygen markup.
+ * libsupc++/exception: Whitespace cleanup.
+
+ * testsuite/libstdc++-dg/conformance.exp: Add testsuite directory
+ decimal.
+ * scripts/create_testsuite_files (dlist): Same.
+
+ * doc/xml/manual/using.xml: One column in table. Move after TR1.
+
+ * testsuite/decimal/bad-cast.cc: Move to...
+ * testsuite/decimal/cast_neg.cc: ...here.
+ * testsuite/decimal/bad-mixed-mode.cc: Move to...
+ * testsuite/decimal/mixed-mode_neg.cc: ...here.
+ * testsuite/decimal/bad-operator.cc: Move to...
+ * testsuite/decimal/operator_neg.cc: ...here.
+
+ * doc/doxygen/user.cfg.in (INPUT): Add decimal/decimal.
+
+2009-10-05 Janis Johnson <janis187@us.ibm.com>
+
+ * doc/Makefile.am: Process new file.
+ * doc/xml/manual/intro.xml: Ditto.
+ * doc/xml/manual/using.xml: Document new header.
+ * doc/xml/manual/status_cxxdecimal.xml: New file.
+ * include/Makefile.am: Process new headers.
+ * include/decimal/decimal: New file.
+ * include/decimal/decimal.h: New file.
+
+2009-10-05 Janis Johnson <janis187@us.ibm.com>
+
+ * testsuite/decimal: New directory.
+ * testsuite/decimal/bad-cast.cc: New test.
+ * testsuite/decimal/bad-mixed-mode.cc: New test.
+ * testsuite/decimal/bad-operator.cc: New test.
+ * testsuite/decimal/binary-arith.cc: New test.
+ * testsuite/decimal/comparison.cc: New test.
+ * testsuite/decimal/compound-assignment.cc: New test.
+ * testsuite/decimal/compound-assignment-memfunc.cc: New test.
+ * testsuite/decimal/conversion-from-float.cc: New test.
+ * testsuite/decimal/conversion-from-integral.cc: New test.
+ * testsuite/decimal/conversion-to-generic-float.cc: New test.
+ * testsuite/decimal/conversion-to-integral.cc: New test.
+ * testsuite/decimal/ctor.cc: New test.
+ * testsuite/decimal/incdec.cc: New test.
+ * testsuite/decimal/incdec-memfunc.cc: New test.
+ * testsuite/decimal/make-decimal.cc: New test.
+ * testsuite/decimal/unary-arith.cc: New test.
+
+2009-10-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/lib/libstdc++.exp (check_v3_target_rvalref): Remove.
+ * testsuite/lib/dg-options.exp (dg-require-rvalref): Likewise.
+
+2009-10-05 Chris Jefferson <chris@bubblescope.net>
+
+ * include/bits/stl_algo.h (__stable_partition_adaptive,
+ __rotate_adaptive, __merge_adaptive, __merge_sort_loop):
+ Extend to work with rvalue references in C++0x mode.
+ * testsuite/25_algorithms/inplace_merge/moveable2.cc: New.
+ * testsuite/25_algorithms/inplace_merge/moveable.cc: Likewise.
+ * testsuite/25_algorithms/stable_partition/moveable.cc: Likewise.
+ * testsuite/25_algorithms/stable_sort/moveable2.cc: Likewise.
+ * testsuite/25_algorithms/stable_sort/moveable.cc: Likewise.
+
+2009-10-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/xml/manual/using.xml: Add profile headers.
+ * testsuite/ext/profile/mh.cc: Restrict to linux.
+
+2009-10-02 Silvius Rus <silvius.rus@gmail.com>
+
+ * configure: Add check for execinfo.h.
+ * config.h.in: Add undef for HAVE_EXECINFO_H.
+ * include/Makefile.am: Add build support for profile mode.
+ * include/Makefile.in: Same.
+ * include/profile/base.h: New file.
+ * include/profile/bitset: Same.
+ * include/profile/deque: Same.
+ * include/profile/hashtable.h: Same.
+ * include/profile/list: Same.
+ * include/profile/map: Same.
+ * include/profile/map.h: Same.
+ * include/profile/multimap.h: Same.
+ * include/profile/multiset.h: Same.
+ * include/profile/set: Same.
+ * include/profile/set.h: Same.
+ * include/profile/unordered_map: Same.
+ * include/profile/unordered_set: Same.
+ * include/profile/vector: Same.
+ * include/profile/impl/profiler.h: Same.
+ * include/profile/impl/profiler_container_size.h: Same.
+ * include/profile/impl/profiler_hash_func.h: Same.
+ * include/profile/impl/profiler_hashtable_size.h: Same.
+ * include/profile/impl/profiler_map_to_unordered_map.h: Same.
+ * include/profile/impl/profiler_node.h: Same.
+ * include/profile/impl/profiler_state.h: Same.
+ * include/profile/impl/profiler_trace.h: Same.
+ * include/profile/impl/profiler_vector_size.h: Same.
+ * include/profile/impl/profiler_vector_to_list.h: Same.
+ * include/std/vector: Include corresponding profile header guarded by
+ _GLIBCXX_PROFILE.
+ * include/std/deque: Same.
+ * include/std/list: Same.
+ * include/std/map: Same.
+ * include/std/unordered_map: Same.
+ * include/std/bitset: Same.
+ * include/std/set: Same.
+ * include/std/unordered_set: Same.
+ * include/backward/hash_map: Same.
+ * include/backward/hash_set: Same.
+ * include/tr1_impl/hashtable (_Hashtable): Expose insert_return_type.
+ * include/bits/c++config: Define profile namespace.
+ * testsuite/Makefile.in: Add check-profile.
+ * testsuite/Makefile.am: Same.
+ * testsuite/ext/profile/all.cc: New file.
+ * testsuite/ext/profile/mh.cc: Same.
+ * testsuite/ext/profile/mutex_extensions.cc: Same.
+ * testsuite/23_containers/unordered_map/profile/hash_map.cc: Same.
+ * testsuite/23_containers/unordered_map/profile/unordered.cc: Same.
+ * testsuite/23_containers/vector/profile/vector.cc: Same.
+ * testsuite/23_containers/vector/resize/moveable.cc: Make it pass
+ in profile mode.
+ * testsuite/23_containers/deque/capacity/moveable.cc: Same.
+ * testsuite/23_containers/list/capacity/29134.cc: Same.
+ * doc/Makefile.in: Add reference to profile_mode.xml.
+ * doc/Makefile.am: Same.
+ * doc/xml/manual/profile_mode.xml: New file.
+ * doc/xml/manual/debug.xml: Add link to profile mode section.
+ * doc/xml/manual/extensions.xml: Add profile mode. Update numbering.
+ * doc/doxygen/user.cfg.in: Add profile mode files.
+
2009-10-02 Johannes Singler <singler@ira.uka.de>
- * include/parallel/base.h: Take integer types from <tr1/cstdint>.
- * include/parallel/compatibility.h: Likewise.
- * include/parallel/multiseq_selection.h: Likewise.
- * include/parallel/random_shuffle.h: Likewise.
- * include/parallel/random_number.h: Likewise;
- use numeric_limits<>::digit instead of sizeof()*8.
- * include/parallel/types.h: Likewise.
- * doc/html/manual/bk01pt12ch31s03.html:
- Document dependency on stdint.h.
+ * include/parallel/base.h: Take integer types from <tr1/cstdint>.
+ * include/parallel/compatibility.h: Likewise.
+ * include/parallel/multiseq_selection.h: Likewise.
+ * include/parallel/random_shuffle.h: Likewise.
+ * include/parallel/random_number.h: Likewise;
+ use numeric_limits<>::digit instead of sizeof()*8.
+ * include/parallel/types.h: Likewise.
+ * doc/html/manual/bk01pt12ch31s03.html:
+ Document dependency on stdint.h.
2009-10-01 Phil Muldoon <pmuldoon@redhat.com>
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 04487e6f85b..51e35ea42a6 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2222,6 +2222,44 @@ AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
dnl
+dnl Check for decimal floating point.
+dnl See:
+dnl http://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html#Decimal-Float
+dnl
+dnl This checks to see if the host supports decimal floating point types.
+dnl
+dnl Defines:
+dnl _GLIBCXX_USE_DECIMAL_FLOAT
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_DECIMAL_FLOAT], [
+
+ # Fake what AC_TRY_COMPILE does, without linking as this is
+ # unnecessary for this test.
+
+ cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+int main()
+{
+ _Decimal32 d1;
+ _Decimal64 d2;
+ _Decimal128 d3;
+ return 0;
+}
+EOF
+
+ AC_MSG_CHECKING([for ISO/IEC TR 24733 ])
+ if AC_TRY_EVAL(ac_compile); then
+ AC_DEFINE(_GLIBCXX_USE_DECIMAL_FLOAT, 1,
+ [Define if ISO/IEC TR 24733 decimal floating point types are supported on this host.])
+ enable_dfp=yes
+ else
+ enable_dfp=no
+ fi
+ AC_MSG_RESULT($enable_dfp)
+ rm -f conftest*
+])
+
+dnl
dnl Check for template specializations for the 'wchar_t' type.
dnl
dnl --enable-wchar_t defines _GLIBCXX_USE_WCHAR_T
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 41cf9679e4b..80419606a1e 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -769,6 +769,10 @@
/* Defined if clock_gettime has realtime clock support. */
#undef _GLIBCXX_USE_CLOCK_REALTIME
+/* Define if ISO/IEC TR 24733 decimal floating point types are supported on
+ this host. */
+#undef _GLIBCXX_USE_DECIMAL_FLOAT
+
/* Defined if gettimeofday is available. */
#undef _GLIBCXX_USE_GETTIMEOFDAY
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index a175be857ea..bad07588b82 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -79,11 +79,14 @@ GLIBCXX_3.4 {
std::gslice*;
std::h[^a]*;
std::i[a-n]*;
- std::ios_base::[A-Ha-z]*;
+# std::ios_base::[A-Ha-z]*;
+ std::ios_base::[A-Ha-f]*;
+ std::ios_base::goodbit;
+ std::ios_base::[h-z]*;
std::ios_base::_M_grow_words*;
std::ios_base::_M_init*;
std::ios_base::Init::[A-Za-z]*;
- std::ios_base::[J-Za-z]*;
+# std::ios_base::[J-Za-z]*;
std::i[p-r]*;
# std::istream
# std::istreambuf_iterator
@@ -121,7 +124,7 @@ GLIBCXX_3.4 {
std::ostrstream*;
std::out_of_range*;
std::overflow_error*;
- std::[p-q]*;
+# std::[p-q]*;
std::r[^e]*;
std::re[^t]*;
# std::rethrow_exception
@@ -167,7 +170,12 @@ GLIBCXX_3.4 {
_ZNSsC[12][EI][PRjmvN]*;
_ZNSsD*;
_ZNSs[0-58-9][a-z]*;
- _ZNSs[67][a-z]*E[PRcjmv]*;
+# _ZNSs[67][a-z]*E[PRcjmv]*;
+ _ZNSs6appendE[PRcjmv]*;
+ _ZNSs6assignE[PRcjmv]*;
+ _ZNSs6insertE[PRcjmv]*;
+ _ZNSs6insertEN9__gnu_cxx17__normal_iteratorIPcSsEE[PRcjmv]*;
+ _ZNSs[67][j-z]*E[PRcjmv]*;
_ZNSs7[a-z]*EES2_[NPRjm]*;
_ZNSs7[a-z]*EES2_S[12]*;
_ZNSs12_Alloc_hiderC*;
@@ -217,8 +225,12 @@ GLIBCXX_3.4 {
_ZNSbIwSt11char_traitsIwESaIwEEC[12][EI][PRjmvN]*;
_ZNSbIwSt11char_traitsIwESaIwEED*;
_ZNSbIwSt11char_traitsIwESaIwEE[0-58-9][a-z]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[67][a-b]*E[PRwjmv]*;
- _ZNSbIwSt11char_traitsIwESaIwEE[67][d-z]*E[PRwjmv]*;
+# _ZNSbIwSt11char_traitsIwESaIwEE[67][a-b]*E[PRwjmv]*;
+ _ZNSbIwSt11char_traitsIwESaIwEE6appendE[PRwjmv]*;
+ _ZNSbIwSt11char_traitsIwESaIwEE6assignE[PRwjmv]*;
+ _ZNSbIwSt11char_traitsIwESaIwEE6insertE[PRwjmv]*;
+ _ZNSbIwSt11char_traitsIwESaIwEE6insertEN9__gnu_cxx17__normal_iteratorIPwS2_EE[PRwjmv]*;
+ _ZNSbIwSt11char_traitsIwESaIwEE[67][j-z]*E[PRwjmv]*;
_ZNSbIwSt11char_traitsIwESaIwEE7[a-z]*EES6_[NPRjm]*;
_ZNSbIwSt11char_traitsIwESaIwEE7[a-z]*EES6_S[56]*;
_ZNSbIwSt11char_traitsIwESaIwEE12_Alloc_hiderC*;
@@ -284,7 +296,6 @@ GLIBCXX_3.4 {
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]_M_[a-z]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][0-9]_M_[a-z]*;
-
# std::basic_iostream constructors, destructors
_ZNSdC*;
_ZNSdD*;
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 1eb77d19193..bdd7a0592c7 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15358,6 +15358,40 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
+
+ # Fake what AC_TRY_COMPILE does, without linking as this is
+ # unnecessary for this test.
+
+ cat > conftest.$ac_ext << EOF
+#line 15366 "configure"
+int main()
+{
+ _Decimal32 d1;
+ _Decimal64 d2;
+ _Decimal128 d3;
+ return 0;
+}
+EOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO/IEC TR 24733 " >&5
+$as_echo_n "checking for ISO/IEC TR 24733 ... " >&6; }
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+$as_echo "#define _GLIBCXX_USE_DECIMAL_FLOAT 1" >>confdefs.h
+
+ enable_dfp=yes
+ else
+ enable_dfp=no
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_dfp" >&5
+$as_echo "$enable_dfp" >&6; }
+ rm -f conftest*
+
+
# Checks for compiler support that doesn't require linking.
# All these tests are for C++; save the language and the compiler flags.
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index e35bc0a9d51..1fd8119b51d 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -128,6 +128,7 @@ GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_PCH($is_hosted)
GLIBCXX_ENABLE_THREADS
GLIBCXX_ENABLE_ATOMIC_BUILTINS
+GLIBCXX_ENABLE_DECIMAL_FLOAT
# Checks for compiler support that doesn't require linking.
GLIBCXX_CHECK_COMPILER_FEATURES
diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am
index d53ae229b8c..947a6d477e8 100644
--- a/libstdc++-v3/doc/Makefile.am
+++ b/libstdc++-v3/doc/Makefile.am
@@ -100,12 +100,14 @@ xml_sources = \
${xml_srcdir}/manual/numerics.xml \
${xml_srcdir}/manual/parallel_mode.xml \
${xml_srcdir}/manual/prerequisites.xml \
+ ${xml_srcdir}/manual/profile_mode.xml \
${xml_srcdir}/manual/internals.xml \
${xml_srcdir}/manual/shared_ptr.xml \
${xml_srcdir}/manual/spine.xml \
${xml_srcdir}/manual/status_cxx1998.xml \
${xml_srcdir}/manual/status_cxx200x.xml \
${xml_srcdir}/manual/status_cxxtr1.xml \
+ ${xml_srcdir}/manual/status_cxxtr24733.xml \
${xml_srcdir}/manual/strings.xml \
${xml_srcdir}/manual/support.xml \
${xml_srcdir}/manual/test.xml \
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index 6eccd899a35..50935ffe158 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -312,12 +312,14 @@ xml_sources = \
${xml_srcdir}/manual/numerics.xml \
${xml_srcdir}/manual/parallel_mode.xml \
${xml_srcdir}/manual/prerequisites.xml \
+ ${xml_srcdir}/manual/profile_mode.xml \
${xml_srcdir}/manual/internals.xml \
${xml_srcdir}/manual/shared_ptr.xml \
${xml_srcdir}/manual/spine.xml \
${xml_srcdir}/manual/status_cxx1998.xml \
${xml_srcdir}/manual/status_cxx200x.xml \
${xml_srcdir}/manual/status_cxxtr1.xml \
+ ${xml_srcdir}/manual/status_cxxtr24733.xml \
${xml_srcdir}/manual/strings.xml \
${xml_srcdir}/manual/support.xml \
${xml_srcdir}/manual/test.xml \
diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in
index 9c4b6c9bf51..a26c5450e79 100644
--- a/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -661,6 +661,25 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/debug/unordered_map \
include/debug/unordered_set \
include/debug/vector \
+ include/profile/bitset \
+ include/profile/deque \
+ include/profile/list \
+ include/profile/map \
+ include/profile/set \
+ include/profile/unordered_map \
+ include/profile/unordered_set \
+ include/profile/vector \
+ include/profile/base.h \
+ include/profile/impl/profiler.h \
+ include/profile/impl/profiler_container_size.h \
+ include/profile/impl/profiler_hash_func.h \
+ include/profile/impl/profiler_hashtable_size.h \
+ include/profile/impl/profiler_map_to_unordered_map.h \
+ include/profile/impl/profiler_node.h \
+ include/profile/impl/profiler_state.h \
+ include/profile/impl/profiler_trace.h \
+ include/profile/impl/profiler_vector_size.h \
+ include/profile/impl/profiler_vector_to_list.h \
include/ext/algorithm \
include/ext/functional \
include/ext/iterator \
@@ -708,6 +727,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/tr1_impl/unordered_set \
include/tr1_impl/utility \
include/tr1_impl \
+ include/decimal/decimal \
include/ \
include/@host_alias@/bits \
include/backward \
@@ -715,6 +735,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/bits/shared_ptr.h \
include/debug \
include/parallel \
+ include/profile \
include/ext \
include/ext/pb_ds \
include/ext/pb_ds/detail
diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html
index cb2d72d61e6..a1f1f289b19 100644
--- a/libstdc++-v3/doc/html/api.html
+++ b/libstdc++-v3/doc/html/api.html
@@ -5,7 +5,7 @@
<a class="ulink" href="http://www.fsf.org/" target="_top">FSF
</a>
- </p></div><div><div class="legalnotice"><a id="id391427"></a><p>
+ </p></div><div><div class="legalnotice"><a id="id485923"></a><p>
<a class="link" href="manual/license.html" title="License">License
</a>
</p></div></div></div><hr /></div><p>
diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html
index 96ff103fb04..b3b2ee69d6c 100644
--- a/libstdc++-v3/doc/html/index.html
+++ b/libstdc++-v3/doc/html/index.html
@@ -12,7 +12,7 @@
<div>
<h1>The GNU C++ Library Documentation</h1>
-<p>Copyright 2008 FSF</p>
+<p>Copyright 2008, 2009 FSF</p>
<p>
Permission is granted to copy, distribute and/or modify this
diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html
index b0d2c7c905d..b0aa6be6fd7 100644
--- a/libstdc++-v3/doc/html/manual/abi.html
+++ b/libstdc++-v3/doc/html/manual/abi.html
@@ -464,56 +464,56 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
<a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
</p><p>
<a class="ulink" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
-</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id548079"></a><p><span class="title"><i>
+</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id390229"></a><p><span class="title"><i>
ABIcheck, a vague idea of checking ABI compatibility
</i>. </span><span class="biblioid">
<a class="ulink" href="http://abicheck.sourceforge.net/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id548097"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id390246"></a><p><span class="title"><i>
C++ ABI Reference
</i>. </span><span class="biblioid">
<a class="ulink" href="http://www.codesourcery.com/public/cxx-abi/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id548114"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id390263"></a><p><span class="title"><i>
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
</i>. </span><span class="biblioid">
<a class="ulink" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id548131"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497386"></a><p><span class="title"><i>
Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
</i>. </span><span class="biblioid">
<a class="ulink" href="http://docs.sun.com/app/docs/doc/817-1984" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id548148"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497402"></a><p><span class="title"><i>
Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
</i>. </span><span class="biblioid">
<a class="ulink" href="http://docs.sun.com/app/docs/doc/819-5266" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id526655"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497420"></a><p><span class="title"><i>
How to Write Shared Libraries
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid">
<a class="ulink" href="http://people.redhat.com/drepper/dsohowto.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id526683"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497448"></a><p><span class="title"><i>
C++ ABI for the ARM Architecture
</i>. </span><span class="biblioid">
<a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id526700"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497465"></a><p><span class="title"><i>
Dynamic Shared Objects: Survey and Issues
</i>. </span><span class="subtitle">
ISO C++ J16/06-0046
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id526733"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497497"></a><p><span class="title"><i>
Versioning With Namespaces
</i>. </span><span class="subtitle">
ISO C++ J16/06-0083
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id526765"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id497530"></a><p><span class="title"><i>
Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems
</i>. </span><span class="subtitle">
SYRCoSE 2009
diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html
index 92e33d33d7b..db71a81443b 100644
--- a/libstdc++-v3/doc/html/manual/algorithms.html
+++ b/libstdc++-v3/doc/html/manual/algorithms.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.algorithms"></a>Part IX. 
Algorithms
- <a id="id445064" class="indexterm"></a>
+ <a id="id397908" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">One Past the End </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index 6af29925e46..c2120235844 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -75,11 +75,11 @@ _Alloc_traits</code> have been removed.
<span class="type">__alloc</span> to select an underlying allocator that
satisfied memory allocation requests. The selection of this
underlying allocator was not user-configurable.
- </p><div class="table"><a id="id539341"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
+ </p><div class="table"><a id="id505845"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
of available allocators. All of these new allocators are
standard-style. The following table includes details, along with
the first released version of GCC that included the extension allocator.
- </p><div class="table"><a id="id545205"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id403516"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
Debug mode first appears.
</p><p>
Precompiled header support <acronym class="acronym">PCH</acronym> support.
diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html
index 5fea7a933b8..a31760453cf 100644
--- a/libstdc++-v3/doc/html/manual/appendix_contributing.html
+++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix A.  Contributing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt12ch40s03.html" title="Use" /><link rel="next" href="source_organization.html" title="Directory Layout and Source Conventions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix A.  Contributing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt12ch41s03.html" title="Use" /><link rel="next" href="source_organization.html" title="Directory Layout and Source Conventions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. 
Contributing
-</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.contrib"></a>Appendix A. 
+</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch41s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.contrib"></a>Appendix A. 
Contributing
- <a id="id419637" class="indexterm"></a>
+ <a id="id384414" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="documentation_style.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="documentation_style.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="documentation_style.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p>
The GNU C++ Library follows an open development model. Active
contributors are assigned maintainer-ship responsibility, and given
@@ -110,4 +110,4 @@
mail message and send it to libstdc++@gcc.gnu.org. All
patches and related discussion should be sent to the
libstdc++ mailing list.
- </p></li></ul></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch40s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Use </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Directory Layout and Source Conventions</td></tr></table></div></body></html>
+ </p></li></ul></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch41s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Use </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Directory Layout and Source Conventions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html
index a27d6e59e31..8fb4578e1c9 100644
--- a/libstdc++-v3/doc/html/manual/appendix_free.html
+++ b/libstdc++-v3/doc/html/manual/appendix_free.html
@@ -5,7 +5,7 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.free"></a>Appendix C. 
Free Software Needs Free Documentation
- <a id="id469283" class="indexterm"></a>
+ <a id="id501419" class="indexterm"></a>
</h2></div></div></div><p>
The biggest deficiency in free operating systems is not in the
software--it is the lack of good free manuals that we can include in
diff --git a/libstdc++-v3/doc/html/manual/appendix_gpl.html b/libstdc++-v3/doc/html/manual/appendix_gpl.html
index 281aeec7fef..88e1468293d 100644
--- a/libstdc++-v3/doc/html/manual/appendix_gpl.html
+++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html
@@ -76,7 +76,7 @@
</p><p>
The precise terms and conditions for copying, distribution and modification
follow.
- </p><h2><a id="id460710"></a>
+ </p><h2><a id="id514028"></a>
TERMS AND CONDITIONS
</h2><h2><a id="gpl-3-definitions"></a>
0. Definitions.
@@ -617,7 +617,7 @@
waiver of all civil liability in connection with the Program, unless a
warranty or assumption of liability accompanies a copy of the Program in
return for a fee.
- </p><h2><a id="id468427"></a>
+ </p><h2><a id="id510808"></a>
END OF TERMS AND CONDITIONS
</h2><h2><a id="HowToApply"></a>
How to Apply These Terms to Your New Programs
diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html
index f45d19b3e06..fceb1abc244 100644
--- a/libstdc++-v3/doc/html/manual/appendix_porting.html
+++ b/libstdc++-v3/doc/html/manual/appendix_porting.html
@@ -5,7 +5,7 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.porting"></a>Appendix B. 
Porting and Maintenance
- <a id="id492719" class="indexterm"></a>
+ <a id="id509079" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
As noted <a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
certain other tools are necessary for hacking on files that
@@ -23,8 +23,8 @@
Regenerate all generated files by using the command sequence
<code class="code">"autoreconf"</code> at the top level of the libstdc++ source
directory. The following will also work, but is much more complex:
- <code class="code">"aclocal-1.7 &amp;&amp; autoconf-2.59 &amp;&amp;
- autoheader-2.59 &amp;&amp; automake-1.7"</code> The version
+ <code class="code">"aclocal-1.11 &amp;&amp; autoconf-2.64 &amp;&amp;
+ autoheader-2.64 &amp;&amp; automake-1.11"</code> The version
numbers may be absent entirely or otherwise vary depending on
<a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">the
current requirements</a> and your vendor's choice of
@@ -196,7 +196,7 @@
</p><p>
If you're wondering what that line noise in the last example was,
that's how you embed autoconf special characters in output text.
- They're called <a class="ulink" href="http://ftp.gnu.org/pub/old-gnu/Manuals/autoconf-2.57/html_mono/autoconf.html#SEC95" target="_top"><span class="emphasis"><em>quadrigraphs</em></span></a>
+ They're called <a class="ulink" href="http://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs" target="_top"><span class="emphasis"><em>quadrigraphs</em></span></a>
and you should use them whenever necessary.
</p></li><li><p>HELP-STRING is what you think it is. Do not include the
"default" text like we used to do; it will be done for you by
diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html
index 854ed1d1a8c..499581ba33c 100644
--- a/libstdc++-v3/doc/html/manual/backwards.html
+++ b/libstdc++-v3/doc/html/manual/backwards.html
@@ -17,8 +17,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of
really useful things that are used by a lot of people, the Standards
Committee couldn't include everything, and so a lot of those
“<span class="quote">obvious</span>” classes didn't get included.
-</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id467544"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id467576"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
+</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id426872"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id426904"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
In earlier versions of the standard,
<code class="filename">fstream.h</code>,
<code class="filename">ostream.h</code>
@@ -44,7 +44,7 @@ considered replaced and rewritten.
archived. The code is considered replaced and rewritten.
</p><p>
Portability notes and known implementation limitations are as follows.
-</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id467674"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
+</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id427002"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
Some care is required to support C++ compiler and or library
implementation that do not have the standard library in
<code class="code">namespace std</code>.
@@ -108,7 +108,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id524920"></a>Illegal iterator usage</h4></div></div></div><p>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384005"></a>Illegal iterator usage</h4></div></div></div><p>
The following illustrate implementation-allowed illegal iterator
use, and then correct use.
</p><div class="itemizedlist"><ul type="disc"><li><p>
@@ -121,7 +121,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
</p></li><li><p>
<code class="code">if (iterator)</code> won't work any more =&gt; use
<code class="code">if (iterator != iterator_type())</code>
- </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id524981"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
+ </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384066"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
</h4></div></div></div><p>
Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros
(isspace, isalpha etc.).
@@ -154,7 +154,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
(<code class="filename">ctype.h</code>) and the
definitions in namespace <code class="code">std::</code>
(<code class="code">&lt;cctype&gt;</code>).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id525075"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384160"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
One solution is to add an autoconf-test for this:
</p><pre class="programlisting">
AC_MSG_CHECKING(for container::at)
@@ -180,7 +180,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
</pre><p>
If you are using other (non-GNU) compilers it might be a good idea
to check for <code class="code">string::at</code> separately.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id525113"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492905"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
Use some kind of autoconf test, plus this:
</p><pre class="programlisting">
#ifdef HAVE_CHAR_TRAITS
@@ -188,7 +188,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
#else
#define CPP_EOF EOF
#endif
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id525131"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492923"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
There are two functions for deleting the contents of a string:
<code class="code">clear</code> and <code class="code">erase</code> (the latter returns the
string).
@@ -206,12 +206,12 @@ erase(size_type __pos = 0, size_type __n = npos)
Unfortunately, <code class="code">clear</code> is not implemented in this
version, so you should use <code class="code">erase</code> (which is probably
faster than <code class="code">operator=(charT*)</code>).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id525176"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492968"></a>
Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
extensions
</h4></div></div></div><p>
These are no longer supported. Please use stringstreams instead.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id525195"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492987"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
Although the ISO standard <code class="code">i/ostringstream</code>-classes are
provided, (<code class="filename">sstream</code>), for
compatibility with older implementations the pre-ISO
@@ -299,14 +299,14 @@ any = temp;
Another example of using stringstreams is in <a class="link" href="bk01pt05ch13s05.html" title="Shrink to Fit">this howto</a>.
</p><p> There is additional information in the libstdc++-v2 info files, in
particular “<span class="quote">info iostream</span>”.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id545596"></a>Little or no wide character support</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511920"></a>Little or no wide character support</h4></div></div></div><p>
Classes <code class="classname">wstring</code> and
<code class="classname">char_traits&lt;wchar_t&gt;</code> are
not supported.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id545615"></a>No templatized iostreams</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511939"></a>No templatized iostreams</h4></div></div></div><p>
Classes <code class="classname">wfilebuf</code> and
<code class="classname">wstringstream</code> are not supported.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id545634"></a>Thread safety issues</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511958"></a>Thread safety issues</h4></div></div></div><p>
Earlier GCC releases had a somewhat different approach to
threading configuration and proper compilation. Before GCC 3.0,
configuration of the threading model was dictated by compiler
@@ -364,7 +364,7 @@ libstdc++-v3.
of the SGI STL (version 3.3), with extensive changes.
</p><p>A more formal description of the V3 goals can be found in the
official <a class="link" href="source_design_notes.html" title="Design Notes">design document</a>.
- </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id545751"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
+ </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id512074"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
(<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are
available, unlike previous libstdc++ versions, but inclusion
generates a warning that you are using deprecated headers.
@@ -436,7 +436,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi
directive <code class="code">using namespace std;</code> can be put at the global
scope. This should be enough to get this code compiling, assuming the
other usage is correct.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id545834"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385442"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
replaced by standardized libraries.
In particular, the unordered_map and unordered_set containers of TR1
are suitable replacement for the non-standard hash_map and hash_set
@@ -508,7 +508,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476825"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385545"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
</h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for
input-streams has been confirmed, most probably because the author
thought it would be more correct to specify nocreate explicitly. So
@@ -519,7 +519,7 @@ open the file for reading, check if it has been opened, and then
decide whether you want to create/replace or not. To my knowledge,
even older implementations support <code class="code">app</code>, <code class="code">ate</code>
and <code class="code">trunc</code> (except for <code class="code">app</code> ?).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476873"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385592"></a>
No <code class="code">stream::attach(int fd)</code>
</h4></div></div></div><p>
Phil Edwards writes: It was considered and rejected for the ISO
@@ -542,7 +542,7 @@ No <code class="code">stream::attach(int fd)</code>
For another example of this, refer to
<a class="ulink" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
by Nicolai Josuttis.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476937"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385656"></a>
Support for C++98 dialect.
</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
</p><pre class="programlisting">
@@ -610,7 +610,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476964"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403656"></a>
Support for C++TR1 dialect.
</h4></div></div></div><p>Check for library coverage of the TR1 standard.
</p><pre class="programlisting">
@@ -687,7 +687,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id477008"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403699"></a>
Support for C++0x dialect.
</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard.
</p><pre class="programlisting">
@@ -899,27 +899,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id477085"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403776"></a>
Container::iterator_type is not necessarily Container::value_type*
</h4></div></div></div><p>
This is a change in behavior from the previous version. Now, most
<span class="type">iterator_type</span> typedefs in container classes are POD
objects, not <span class="type">value_type</span> pointers.
-</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id477115"></a><p>[<abbr class="abbrev">
+</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id403806"></a><p>[<abbr class="abbrev">
kegel41
</abbr>] <span class="title"><i>
Migrating to GCC 4.1
</i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id469192"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id403838"></a><p>[<abbr class="abbrev">
kegel41
</abbr>] <span class="title"><i>
Building the Whole Debian Archive with GCC 4.1: A Summary
</i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span><span class="biblioid">
<a class="ulink" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id469224"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id403871"></a><p>[<abbr class="abbrev">
lbl32
</abbr>] <span class="title"><i>
Migration guide for GCC-3.2
diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
index 72eec938105..e60f6671d25 100644
--- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html
+++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitmap_allocator</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_allocators.html" title="Chapter 32. Allocators" /><link rel="prev" href="ext_allocators.html" title="Chapter 32. Allocators" /><link rel="next" href="ext_containers.html" title="Chapter 33. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_allocators.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Allocators</th><td width="20%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.bitmap"></a>bitmap_allocator</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitmap_allocator</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_allocators.html" title="Chapter 33. Allocators" /><link rel="prev" href="ext_allocators.html" title="Chapter 33. Allocators" /><link rel="next" href="ext_containers.html" title="Chapter 34. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_allocators.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Allocators</th><td width="20%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.bitmap"></a>bitmap_allocator</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.bitmap.design"></a>Design</h3></div></div></div><p>
As this name suggests, this allocator uses a bit-map to keep track
of the used and unused memory locations for it's book-keeping
@@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p>
</p><p>
Consider a block of size 64 ints. In memory, it would look like this:
(assume a 32-bit system where, size_t is a 32-bit entity).
- </p><div class="table"><a id="id508940"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id393472"></a><p class="title"><b>Table 33.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
The first Column(268) represents the size of the Block in bytes as
seen by the Bitmap Allocator. Internally, a global free list is
used to keep track of the free blocks used and given back by the
@@ -337,4 +337,4 @@ equivalent.</p></li><li><p>And also this would preserve the cache as far as poss
sizeof(size_t) x 8 which is the number of bits in an integer,
which can fit exactly in a CPU register. Hence, the term given is
exponential growth of the internal pool.
- </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_allocators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_allocators.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 32. Allocators </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 33. Containers</td></tr></table></div></body></html>
+ </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_allocators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_allocators.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 33. Allocators </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 34. Containers</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bitset.html b/libstdc++-v3/doc/html/manual/bitset.html
index 85dbc857ae7..acc150df7e8 100644
--- a/libstdc++-v3/doc/html/manual/bitset.html
+++ b/libstdc++-v3/doc/html/manual/bitset.html
@@ -84,7 +84,7 @@
author would love to hear from you...
</p><p>
Also note that the implementation of bitset used in libstdc++ has
- <a class="link" href="bk01pt12ch33s02.html" title="HP/SGI">some extensions</a>.
+ <a class="link" href="bk01pt12ch34s02.html" title="HP/SGI">some extensions</a>.
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="associative.bitset.type_string"></a>Type String</h3></div></div></div><p>
</p><p>
Bitmasks do not take char* nor const char* arguments in their
diff --git a/libstdc++-v3/doc/html/manual/bk01ix01.html b/libstdc++-v3/doc/html/manual/bk01ix01.html
index e46ca2ea195..9feecbf32ae 100644
--- a/libstdc++-v3/doc/html/manual/bk01ix01.html
+++ b/libstdc++-v3/doc/html/manual/bk01ix01.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gfdl.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a id="id546577"></a>Index</h2></div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>Algorithms, <a class="indexterm" href="algorithms.html">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gfdl.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a id="id496564"></a>Index</h2></div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>Algorithms, <a class="indexterm" href="algorithms.html">
Algorithms
</a></dt><dt>Appendix</dt><dd><dl><dt>Contributing, <a class="indexterm" href="appendix_contributing.html">
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
index 724322683bf..2bdadd27d95 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II.  Support" /><link rel="prev" href="support.html" title="Part II.  Support" /><link rel="next" href="fundamental_types.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. 
Support
-</th><td width="20%" align="right"> <a accesskey="n" href="fundamental_types.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id455418"></a></h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="fundamental_types.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id492782"></a></h2></div></div></div><p>
This part deals with the functions called and objects created
automatically during the course of a program's existence.
</p><p>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
index 35101a56e1e..1397245fd93 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX.  Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX.  Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. 
Algorithms
-</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id445072"></a></h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id397917"></a></h2></div></div></div><p>
The neatest accomplishment of the algorithms chapter is that all the
work is done via iterators, not containers directly. This means two
important things:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
deleted file mode 100644
index ff71f7d383b..00000000000
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>More Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="fstreams.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27s02.html" title="Binary Input and Output" /><link rel="next" href="io_and_c.html" title="Chapter 28. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">More Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary2"></a>More Binary Input and Output</h2></div></div></div><p>Towards the beginning of February 2001, the subject of
- "binary" I/O was brought up in a couple of places at the
- same time. One notable place was Usenet, where James Kanze and
- Dietmar Kühl separately posted articles on why attempting
- generic binary I/O was not a good idea. (Here are copies of
- <a class="ulink" href="binary_iostreams_kanze.txt" target="_top">Kanze's article</a> and
- <a class="ulink" href="binary_iostreams_kuehl.txt" target="_top">Kühl's article</a>.)
- </p><p>Briefly, the problems of byte ordering and type sizes mean that
- the unformatted functions like <code class="code">ostream::put()</code> and
- <code class="code">istream::get()</code> cannot safely be used to communicate
- between arbitrary programs, or across a network, or from one
- invocation of a program to another invocation of the same program
- on a different platform, etc.
- </p><p>The entire Usenet thread is instructive, and took place under the
- subject heading "binary iostreams" on both comp.std.c++
- and comp.lang.c++.moderated in parallel. Also in that thread,
- Dietmar Kühl mentioned that he had written a pair of stream
- classes that would read and write XDR, which is a good step towards
- a portable binary format.
- </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="fstreams.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Binary Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 28. Interacting with C</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
index 9bbbdc2fc11..613964f8cc2 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
@@ -19,6 +19,6 @@
mode or with debug mode. The
following table provides the names and headers of the debugging
containers:
-</p><div class="table"><a id="id452232"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
+</p><div class="table"><a id="id517820"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
containers have additional debug capability.
-</p><div class="table"><a id="id387544"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
+</p><div class="table"><a id="id357333"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
index cdd2f3df46a..9e38ab478dd 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
@@ -17,11 +17,7 @@ In addition, hardware that supports atomic operations and a compiler
as <code class="literal">-march=i686</code>,
<code class="literal">-march=native</code> or <code class="literal">-mcpu=v9</code>. See
the GCC manual for more information.
-</p>
-<p>
- Also, the parallel mode requires platform support for stdint.h.
-</p>
-</div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.using.parallel_mode"></a>Using Parallel Mode</h3></div></div></div><p>
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.using.parallel_mode"></a>Using Parallel Mode</h3></div></div></div><p>
To use the libstdc++ parallel mode, compile your application with
the prerequisite flags as detailed above, and in addition
add <code class="constant">-D_GLIBCXX_PARALLEL</code>. This will convert all
@@ -67,4 +63,4 @@ Then compile this code with the prerequisite compiler flags
flags for atomic operations.)
</p><p> The following table provides the names and headers of all the
parallel algorithms that can be used in a similar manner:
-</p><div class="table"><a id="id468908"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
+</p><div class="table"><a id="id479890"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
index 8de6c2dc633..18598fcb319 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s04.html" title="Design" /><link rel="next" href="ext_allocators.html" title="Chapter 32. Allocators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="ext_allocators.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s04.html" title="Design" /><link rel="next" href="profile_mode.html" title="Chapter 32. Profile Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
Both the normal conformance and regression tests and the
supplemental performance tests work.
</p><p>
@@ -23,4 +23,4 @@
additional software dependencies than the usual bare-boned text
file, and can be generated by using the <code class="code">make
doc-performance</code> rule in the testsuite's Makefile.
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_allocators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 32. Allocators</td></tr></table></div></body></html>
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 32. Profile Mode</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html
new file mode 100644
index 00000000000..0aac094031e
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="next" href="bk01pt12ch32s03.html" title="Extensions for Custom Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.design"></a>Design</h2></div></div></div><p>
+</p><div class="table"><a id="id474437"></a><p class="title"><b>Table 32.1. Code Location</b></p><div class="table-contents"><table summary="Code Location" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Code Location</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left"><code class="code">libstdc++-v3/include/std/*</code></td><td align="left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/*</code></td><td align="left">Profile extension public headers (map, vector, ...).</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td align="left">Profile extension internals. Implementation files are
+ only included from <code class="code">impl/profiler.h</code>, which is the only
+ file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.wrapper"></a>Wrapper Model</h3></div></div></div><p>
+ In order to get our instrumented library version included instead of the
+ release one,
+ we use the same wrapper model as the debug mode.
+ We subclass entities from the release version. Wherever
+ <code class="code">_GLIBCXX_PROFILE</code> is defined, the release namespace is
+ <code class="code">std::__norm</code>, whereas the profile namespace is
+ <code class="code">std::__profile</code>. Using plain <code class="code">std</code> translates
+ into <code class="code">std::__profile</code>.
+ </p><p>
+ Whenever possible, we try to wrap at the public interface level, e.g.,
+ in <code class="code">unordered_set</code> rather than in <code class="code">hashtable</code>,
+ in order not to depend on implementation.
+ </p><p>
+ Mixing object files built with and without the profile mode must
+ not affect the program execution. However, there are no guarantees to
+ the accuracy of diagnostics when using even a single object not built with
+ <code class="code">-D_GLIBCXX_PROFILE</code>.
+ Currently, mixing the profile mode with debug and parallel extensions is
+ not allowed. Mixing them at compile time will result in preprocessor errors.
+ Mixing them at link time is undefined.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.instrumentation"></a>Instrumentation</h3></div></div></div><p>
+ Instead of instrumenting every public entry and exit point,
+ we chose to add instrumentation on demand, as needed
+ by individual diagnostics.
+ The main reason is that some diagnostics require us to extract bits of
+ internal state that are particular only to that diagnostic.
+ We plan to formalize this later, after we learn more about the requirements
+ of several diagnostics.
+ </p><p>
+ All the instrumentation points can be switched on and off using
+ <code class="code">-D[_NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code> options.
+ With all the instrumentation calls off, there should be negligible
+ overhead over the release version. This property is needed to support
+ diagnostics based on timing of internal operations. For such diagnostics,
+ we anticipate turning most of the instrumentation off in order to prevent
+ profiling overhead from polluting time measurements, and thus diagnostics.
+ </p><p>
+ All the instrumentation on/off compile time switches live in
+ <code class="code">include/profile/profiler.h</code>.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.rtlib"></a>Run Time Behavior</h3></div></div></div><p>
+ For practical reasons, the instrumentation library processes the trace
+ partially
+ rather than dumping it to disk in raw form. Each event is processed when
+ it occurs. It is usually attached a cost and it is aggregated into
+ the database of a specific diagnostic class. The cost model
+ is based largely on the standard performance guarantees, but in some
+ cases we use knowledge about GCC's standard library implementation.
+ </p><p>
+ Information is indexed by (1) call stack and (2) instance id or address
+ to be able to understand and summarize precise creation-use-destruction
+ dynamic chains. Although the analysis is sensitive to dynamic instances,
+ the reports are only sensitive to call context. Whenever a dynamic instance
+ is destroyed, we accumulate its effect to the corresponding entry for the
+ call stack of its constructor location.
+ </p><p>
+ For details, see
+ <a class="ulink" href="http://dx.doi.org/10.1109/CGO.2009.36" target="_top">paper presented at
+ CGO 2009</a>.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.analysis"></a>Analysis and Diagnostics</h3></div></div></div><p>
+ Final analysis takes place offline, and it is based entirely on the
+ generated trace and debugging info in the application binary.
+ See section Diagnostics for a list of analysis types that we plan to support.
+ </p><p>
+ The input to the analysis is a table indexed by profile type and call stack.
+ The data type for each entry depends on the profile type.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.cost-model"></a>Cost Model</h3></div></div></div><p>
+ While it is likely that cost models become complex as we get into
+ more sophisticated analysis, we will try to follow a simple set of rules
+ at the beginning.
+ </p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Relative benefit estimation:</em></span>
+ The idea is to estimate or measure the cost of all operations
+ in the original scenario versus the scenario we advise to switch to.
+ For instance, when advising to change a vector to a list, an occurrence
+ of the <code class="code">insert</code> method will generally count as a benefit.
+ Its magnitude depends on (1) the number of elements that get shifted
+ and (2) whether it triggers a reallocation.
+ </p></li><li><p><span class="emphasis"><em>Synthetic measurements:</em></span>
+ We will measure the relative difference between similar operations on
+ different containers. We plan to write a battery of small tests that
+ compare the times of the executions of similar methods on different
+ containers. The idea is to run these tests on the target machine.
+ If this training phase is very quick, we may decide to perform it at
+ library initialization time. The results can be cached on disk and reused
+ across runs.
+ </p></li><li><p><span class="emphasis"><em>Timers:</em></span>
+ We plan to use timers for operations of larger granularity, such as sort.
+ For instance, we can switch between different sort methods on the fly
+ and report the one that performs best for each call context.
+ </p></li><li><p><span class="emphasis"><em>Show stoppers:</em></span>
+ We may decide that the presence of an operation nullifies the advice.
+ For instance, when considering switching from <code class="code">set</code> to
+ <code class="code">unordered_set</code>, if we detect use of operator <code class="code">++</code>,
+ we will simply not issue the advice, since this could signal that the use
+ care require a sorted container.</p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.reports"></a>Reports</h3></div></div></div><p>
+There are two types of reports. First, if we recognize a pattern for which
+we have a substitute that is likely to give better performance, we print
+the advice and estimated performance gain. The advice is usually associated
+to a code position and possibly a call stack.
+ </p><p>
+Second, we report performance characteristics for which we do not have
+a clear solution for improvement. For instance, we can point to the user
+the top 10 <code class="code">multimap</code> locations
+which have the worst data locality in actual traversals.
+Although this does not offer a solution,
+it helps the user focus on the key problems and ignore the uninteresting ones.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.testing"></a>Testing</h3></div></div></div><p>
+ First, we want to make sure we preserve the behavior of the release mode.
+ You can just type <code class="code">"make check-profile"</code>, which
+ builds and runs the whole test suite in profile mode.
+ </p><p>
+ Second, we want to test the correctness of each diagnostic.
+ We created a <code class="code">profile</code> directory in the test suite.
+ Each diagnostic must come with at least two tests, one for false positives
+ and one for false negatives.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 32. Profile Mode </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Extensions for Custom Containers</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html
new file mode 100644
index 00000000000..36aaf9392da
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Extensions for Custom Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="bk01pt12ch32s02.html" title="Design" /><link rel="next" href="bk01pt12ch32s04.html" title="Empirical Cost Model" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Extensions for Custom Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s02.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.api"></a>Extensions for Custom Containers</h2></div></div></div><p>
+ Many large projects use their own data structures instead of the ones in the
+ standard library. If these data structures are similar in functionality
+ to the standard library, they can be instrumented with the same hooks
+ that are used to instrument the standard library.
+ The instrumentation API is exposed in file
+ <code class="code">profiler.h</code> (look for "Instrumentation hooks").
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Empirical Cost Model</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html
new file mode 100644
index 00000000000..4246904d4fe
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Empirical Cost Model</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="bk01pt12ch32s03.html" title="Extensions for Custom Containers" /><link rel="next" href="bk01pt12ch32s05.html" title="Implementation Issues" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Empirical Cost Model</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s03.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.cost_model"></a>Empirical Cost Model</h2></div></div></div><p>
+ Currently, the cost model uses formulas with predefined relative weights
+ for alternative containers or container implementations. For instance,
+ iterating through a vector is X times faster than iterating through a list.
+ </p><p>
+ (Under development.)
+ We are working on customizing this to a particular machine by providing
+ an automated way to compute the actual relative weights for operations
+ on the given machine.
+ </p><p>
+ (Under development.)
+ We plan to provide a performance parameter database format that can be
+ filled in either by hand or by an automated training mechanism.
+ The analysis module will then use this database instead of the built in.
+ generic parameters.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Extensions for Custom Containers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation Issues</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html
new file mode 100644
index 00000000000..42fae0c1ed6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation Issues</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="bk01pt12ch32s04.html" title="Empirical Cost Model" /><link rel="next" href="bk01pt12ch32s06.html" title="Developer Information" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s04.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s06.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.implementation"></a>Implementation Issues</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.stack"></a>Stack Traces</h3></div></div></div><p>
+ Accurate stack traces are needed during profiling since we group events by
+ call context and dynamic instance. Without accurate traces, diagnostics
+ may be hard to interpret. For instance, when giving advice to the user
+ it is imperative to reference application code, not library code.
+ </p><p>
+ Currently we are using the libc <code class="code">backtrace</code> routine to get
+ stack traces.
+ <code class="code">_GLIBCXX_PROFILE_STACK_DEPTH</code> can be set
+ to 0 if you are willing to give up call context information, or to a small
+ positive value to reduce run time overhead.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.symbols"></a>Symbolization of Instruction Addresses</h3></div></div></div><p>
+ The profiling and analysis phases use only instruction addresses.
+ An external utility such as addr2line is needed to postprocess the result.
+ We do not plan to add symbolization support in the profile extension.
+ This would require access to symbol tables, debug information tables,
+ external programs or libraries and other system dependent information.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.concurrency"></a>Concurrency</h3></div></div></div><p>
+ Our current model is simplistic, but precise.
+ We cannot afford to approximate because some of our diagnostics require
+ precise matching of operations to container instance and call context.
+ During profiling, we keep a single information table per diagnostic.
+ There is a single lock per information table.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.stdlib-in-proflib"></a>Using the Standard Library in the Instrumentation Implementation</h3></div></div></div><p>
+ As much as we would like to avoid uses of stdlibc++ within our
+ instrumentation library, containers such as unordered_map are very
+ appealing. We plan to use them as long as they are named properly
+ to avoid ambiguity.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.malloc-hooks"></a>Malloc Hooks</h3></div></div></div><p>
+ User applications/libraries can provide malloc hooks.
+ When the implementation of the malloc hooks uses stdlibc++, there can
+ be an infinite cycle between the profile mode instrumentation and the
+ the malloc hook code.
+ </p><p>
+ We protect against reentrance to the profile mode instrumentation code,
+ which should avoid this problem in most cases.
+ The protection mechanism is thread safe and exception safe.
+ This mechanism does not prevent reentrance to the malloc hook itself,
+ which could still result in deadlock, if, for instance, the malloc hook
+ uses non-recursive locks.
+ XXX: A definitive solution to this problem would be for the profile extension
+ to use a custom allocator internally, and perhaps not to use libstdc++.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.construction-destruction"></a>Construction and Destruction of Global Objects</h3></div></div></div><p>
+ The profiling library state is initialized at the first call to a profiling
+ method. This allows us to record the construction of all global objects.
+ However, we cannot do the same at destruction time. The trace is written
+ by a function registered by <code class="code">atexit</code>, thus invoked by
+ <code class="code">exit</code>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Empirical Cost Model </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Developer Information</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html
new file mode 100644
index 00000000000..475b2d4fffc
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Developer Information</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="bk01pt12ch32s05.html" title="Implementation Issues" /><link rel="next" href="bk01pt12ch32s07.html" title="Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Developer Information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s05.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s07.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.developer"></a>Developer Information</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.developer.bigpic"></a>Big Picture</h3></div></div></div><p>The profile mode headers are included with
+ <code class="code">-D_GLIBCXX_PROFILE</code> through preprocessor directives in
+ <code class="code">include/std/*</code>.
+ </p><p>Instrumented implementations are provided in
+ <code class="code">include/profile/*</code>. All instrumentation hooks are macros
+ defined in <code class="code">include/profile/profiler.h</code>.
+ </p><p>All the implementation of the instrumentation hooks is in
+ <code class="code">include/profile/impl/*</code>. Although all the code gets included,
+ thus is publicly visible, only a small number of functions are called from
+ outside this directory. All calls to hook implementations must be
+ done through macros defined in <code class="code">profiler.h</code>. The macro
+ must ensure (1) that the call is guarded against reentrance and
+ (2) that the call can be turned off at compile time using a
+ <code class="code">-D_GLIBCXX_PROFILE_...</code> compiler option.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.developer.howto"></a>How To Add A Diagnostic</h3></div></div></div><p>Let's say the diagnostic name is "magic".
+ </p><p>If you need to instrument a header not already under
+ <code class="code">include/profile/*</code>, first edit the corresponding header
+ under <code class="code">include/std/</code> and add a preprocessor directive such
+ as the one in <code class="code">include/std/vector</code>:
+</p><pre class="programlisting">
+#ifdef _GLIBCXX_PROFILE
+# include &lt;profile/vector&gt;
+#endif
+</pre><p>
+ </p><p>If the file you need to instrument is not yet under
+ <code class="code">include/profile/</code>, make a copy of the one in
+ <code class="code">include/debug</code>, or the main implementation.
+ You'll need to include the main implementation and inherit the classes
+ you want to instrument. Then define the methods you want to instrument,
+ define the instrumentation hooks and add calls to them.
+ Look at <code class="code">include/profile/vector</code> for an example.
+ </p><p>Add macros for the instrumentation hooks in
+ <code class="code">include/profile/impl/profiler.h</code>.
+ Hook names must start with <code class="code">__profcxx_</code>.
+ Make sure they transform
+ in no code with <code class="code">-D_NO_GLBICXX_PROFILE_MAGIC</code>.
+ Make sure all calls to any method in namespace <code class="code">__cxxprof_impl</code>
+ is protected against reentrance using macro
+ <code class="code">_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD</code>.
+ All names of methods in namespace <code class="code">__cxxprof_impl</code> called from
+ <code class="code">profiler.h</code> must start with <code class="code">__trace_magic_</code>.
+ </p><p>Add the implementation of the diagnostic.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Create new file <code class="code">include/profile/impl/profiler_magic.h</code>.
+ </p></li><li><p>
+ Define class <code class="code">__magic_info: public __object_info_base</code>.
+ This is the representation of a line in the object table.
+ The <code class="code">__merge</code> method is used to aggregate information
+ across all dynamic instances created at the same call context.
+ The <code class="code">__magnitude</code> must return the estimation of the benefit
+ as a number of small operations, e.g., number of words copied.
+ The <code class="code">__write</code> method is used to produce the raw trace.
+ The <code class="code">__advice</code> method is used to produce the advice string.
+ </p></li><li><p>
+ Define class <code class="code">__magic_stack_info: public __magic_info</code>.
+ This defines the content of a line in the stack table.
+ </p></li><li><p>
+ Define class <code class="code">__trace_magic: public __trace_base&lt;__magic_info,
+ __magic_stack_info&gt;</code>.
+ It defines the content of the trace associated with this diagnostic.
+ </p></li></ul></div><p>
+ </p><p>Add initialization and reporting calls in
+ <code class="code">include/profile/impl/profiler_trace.h</code>. Use
+ <code class="code">__trace_vector_to_list</code> as an example.
+ </p><p>Add documentation in file <code class="code">doc/xml/manual/profile_mode.xml</code>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation Issues </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Diagnostics</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html
new file mode 100644
index 00000000000..7420fdeb7d3
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html
@@ -0,0 +1,528 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Diagnostics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="bk01pt12ch32s06.html" title="Developer Information" /><link rel="next" href="ext_allocators.html" title="Chapter 33. Allocators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s06.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="ext_allocators.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.diagnostics"></a>Diagnostics</h2></div></div></div><p>
+ The table below presents all the diagnostics we intend to implement.
+ Each diagnostic has a corresponding compile time switch
+ <code class="code">-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
+ Groups of related diagnostics can be turned on with a single switch.
+ For instance, <code class="code">-D_GLIBCXX_PROFILE_LOCALITY</code> is equivalent to
+ <code class="code">-D_GLIBCXX_PROFILE_SOFTWARE_PREFETCH
+ -D_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
+ </p><p>
+ The benefit, cost, expected frequency and accuracy of each diagnostic
+ was given a grade from 1 to 10, where 10 is highest.
+ A high benefit means that, if the diagnostic is accurate, the expected
+ performance improvement is high.
+ A high cost means that turning this diagnostic on leads to high slowdown.
+ A high frequency means that we expect this to occur relatively often.
+ A high accuracy means that the diagnostic is unlikely to be wrong.
+ These grades are not perfect. They are just meant to guide users with
+ specific needs or time budgets.
+ </p><div class="table"><a id="id501361"></a><p class="title"><b>Table 32.2. Diagnostics</b></p><div class="table-contents"><table summary="Diagnostics" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Group</th><th align="left">Flag</th><th align="left">Benefit</th><th align="left">Cost</th><th align="left">Freq.</th><th align="left">Implemented</th></tr></thead><tbody><tr><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.containers" target="_top">
+ CONTAINERS</a></td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.hashtable_too_small" target="_top">
+ HASHTABLE_TOO_SMALL</a></td><td align="left">10</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.hashtable_too_large" target="_top">
+ HASHTABLE_TOO_LARGE</a></td><td align="left">5</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.inefficient_hash" target="_top">
+ INEFFICIENT_HASH</a></td><td align="left">7</td><td align="left">3</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.vector_too_small" target="_top">
+ VECTOR_TOO_SMALL</a></td><td align="left">8</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.vector_too_large" target="_top">
+ VECTOR_TOO_LARGE</a></td><td align="left">5</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.vector_to_hashtable" target="_top">
+ VECTOR_TO_HASHTABLE</a></td><td align="left">7</td><td align="left">7</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.hashtable_to_vector" target="_top">
+ HASHTABLE_TO_VECTOR</a></td><td align="left">7</td><td align="left">7</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.vector_to_list" target="_top">
+ VECTOR_TO_LIST</a></td><td align="left">8</td><td align="left">5</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.list_to_vector" target="_top">
+ LIST_TO_VECTOR</a></td><td align="left">10</td><td align="left">5</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.assoc_ord_to_unord" target="_top">
+ ORDERED_TO_UNORDERED</a></td><td align="left">10</td><td align="left">5</td><td align="left"> </td><td align="left">10</td><td align="left">only map/unordered_map</td></tr><tr><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.algorithms" target="_top">
+ ALGORITHMS</a></td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.algorithms.sort" target="_top">
+ SORT</a></td><td align="left">7</td><td align="left">8</td><td align="left"> </td><td align="left">7</td><td align="left">no</td></tr><tr><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.locality" target="_top">
+ LOCALITY</a></td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.locality.sw_prefetch" target="_top">
+ SOFTWARE_PREFETCH</a></td><td align="left">8</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.locality.linked" target="_top">
+ RBTREE_LOCALITY</a></td><td align="left">4</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.mthread.false_share" target="_top">
+ FALSE_SHARING</a></td><td align="left">8</td><td align="left">10</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr></tbody></table></div></div><br class="table-break" /><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.template"></a>Diagnostic Template</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> What problem will it diagnose?
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>.
+ What is the fundamental reason why this is a problem</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>
+ Percentage reduction in execution time. When reduction is more than
+ a constant factor, describe the reduction rate formula.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ What would the advise look like?</p></li><li><p><span class="emphasis"><em>To instrument:</em></span>
+ What stdlibc++ components need to be instrumented?</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ How do we decide when to issue the advice?</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ How do we measure benefits? Math goes here.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+program code
+...
+advice sample
+</pre><p>
+</p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.containers"></a>Containers</h3></div></div></div><p>
+<span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_CONTAINERS</code>.
+</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_too_small"></a>Hashtable Too Small</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with many
+ rehash operations, small construction size and large destruction size.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span> Rehash is very expensive.
+ Read content, follow chains within bucket, evaluate hash function, place at
+ new location in different order.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span> 36%.
+ Code similar to example below.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ Set initial size to N at construction site S.
+ </p></li><li><p><span class="emphasis"><em>To instrument:</em></span>
+ <code class="code">unordered_set, unordered_map</code> constructor, destructor, rehash.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">unordered_[multi]set|map</code>,
+ record initial size and call context of the constructor.
+ Record size increase, if any, after each relevant operation such as insert.
+ Record the estimated rehash cost.</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Number of individual rehash operations * cost per rehash.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 unordered_set&lt;int&gt; us;
+2 for (int k = 0; k &lt; 1000000; ++k) {
+3 us.insert(k);
+4 }
+
+foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1025530 rehash operations.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_too_large"></a>Hashtable Too Large</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables which are
+ never filled up because fewer elements than reserved are ever
+ inserted.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span> Save memory, which
+ is good in itself and may also improve memory reference performance through
+ fewer cache and TLB misses.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span> unknown.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ Set initial size to N at construction site S.
+ </p></li><li><p><span class="emphasis"><em>To instrument:</em></span>
+ <code class="code">unordered_set, unordered_map</code> constructor, destructor, rehash.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">unordered_[multi]set|map</code>,
+ record initial size and call context of the constructor, and correlate it
+ with its size at destruction time.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Number of iteration operations + memory saved.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;unordered_set&lt;int&gt;&gt; v(100000, unordered_set&lt;int&gt;(100)) ;
+2 for (int k = 0; k &lt; 100000; ++k) {
+3 for (int j = 0; j &lt; 10; ++j) {
+4 v[k].insert(k + j);
+5 }
+6 }
+
+foo.cc:1: advice: Changing initial unordered_set size from 100 to 10 saves N
+bytes of memory and M iteration steps.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.inefficient_hash"></a>Inefficient Hash</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_INEFFICIENT_HASH</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with polarized
+ distribution.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span> A non-uniform
+ distribution may lead to long chains, thus possibly increasing complexity
+ by a factor up to the number of elements.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span> factor up
+ to container size.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span> Change hash function
+ for container built at site S. Distribution score = N. Access score = S.
+ Longest chain = C, in bucket B.
+ </p></li><li><p><span class="emphasis"><em>To instrument:</em></span>
+ <code class="code">unordered_set, unordered_map</code> constructor, destructor, [],
+ insert, iterator.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ Count the exact number of link traversals.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Total number of links traversed.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+class dumb_hash {
+ public:
+ size_t operator() (int i) const { return 0; }
+};
+...
+ unordered_set&lt;int, dumb_hash&gt; hs;
+ ...
+ for (int i = 0; i &lt; COUNT; ++i) {
+ hs.find(i);
+ }
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_too_small"></a>Vector Too Small</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span>Detect vectors with many
+ resize operations, small construction size and large destruction size..
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>Resizing can be expensive.
+ Copying large amounts of data takes time. Resizing many small vectors may
+ have allocation overhead and affect locality.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ Set initial size to N at construction site S.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">vector</code>.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">vector</code>,
+ record initial size and call context of the constructor.
+ Record size increase, if any, after each relevant operation such as
+ <code class="code">push_back</code>. Record the estimated resize cost.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Total number of words copied * time to copy a word.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;int&gt; v;
+2 for (int k = 0; k &lt; 1000000; ++k) {
+3 v.push_back(k);
+4 }
+
+foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves
+copying 4000000 bytes and 20 memory allocations and deallocations.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_too_large"></a>Vector Too Large</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_LARGE</code>
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span>Detect vectors which are
+ never filled up because fewer elements than reserved are ever
+ inserted.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>Save memory, which
+ is good in itself and may also improve memory reference performance through
+ fewer cache and TLB misses.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ Set initial size to N at construction site S.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">vector</code>.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">vector</code>,
+ record initial size and call context of the constructor, and correlate it
+ with its size at destruction time.</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Total amount of memory saved.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;vector&lt;int&gt;&gt; v(100000, vector&lt;int&gt;(100)) ;
+2 for (int k = 0; k &lt; 100000; ++k) {
+3 for (int j = 0; j &lt; 10; ++j) {
+4 v[k].insert(k + j);
+5 }
+6 }
+
+foo.cc:1: advice: Changing initial vector size from 100 to 10 saves N
+bytes of memory and may reduce the number of cache and TLB misses.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_to_hashtable"></a>Vector to Hashtable</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect uses of
+ <code class="code">vector</code> that can be substituted with <code class="code">unordered_set</code>
+ to reduce execution time.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Linear search in a vector is very expensive, whereas searching in a hashtable
+ is very quick.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>factor up
+ to container size.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>Replace
+ <code class="code">vector</code> with <code class="code">unordered_set</code> at site S.
+ </p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">vector</code>
+ operations and access methods.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">vector</code>,
+ record call context of the constructor. Issue the advice only if the
+ only methods called on this <code class="code">vector</code> are <code class="code">push_back</code>,
+ <code class="code">insert</code> and <code class="code">find</code>.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Cost(vector::push_back) + cost(vector::insert) + cost(find, vector) -
+ cost(unordered_set::insert) + cost(unordered_set::find).
+ </p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;int&gt; v;
+...
+2 for (int i = 0; i &lt; 1000; ++i) {
+3 find(v.begin(), v.end(), i);
+4 }
+
+foo.cc:1: advice: Changing "vector" to "unordered_set" will save about 500,000
+comparisons.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_to_vector"></a>Hashtable to Vector</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect uses of
+ <code class="code">unordered_set</code> that can be substituted with <code class="code">vector</code>
+ to reduce execution time.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Hashtable iterator is slower than vector iterator.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>95%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>Replace
+ <code class="code">unordered_set</code> with <code class="code">vector</code> at site S.
+ </p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">unordered_set</code>
+ operations and access methods.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">unordered_set</code>,
+ record call context of the constructor. Issue the advice only if the
+ number of <code class="code">find</code>, <code class="code">insert</code> and <code class="code">[]</code>
+ operations on this <code class="code">unordered_set</code> are small relative to the
+ number of elements, and methods <code class="code">begin</code> or <code class="code">end</code>
+ are invoked (suggesting iteration).</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Number of .</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 unordered_set&lt;int&gt; us;
+...
+2 int s = 0;
+3 for (unordered_set&lt;int&gt;::iterator it = us.begin(); it != us.end(); ++it) {
+4 s += *it;
+5 }
+
+foo.cc:1: advice: Changing "unordered_set" to "vector" will save about N
+indirections and may achieve better data locality.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_to_list"></a>Vector to List</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect cases where
+ <code class="code">vector</code> could be substituted with <code class="code">list</code> for
+ better performance.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Inserting in the middle of a vector is expensive compared to inserting in a
+ list.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>factor up to
+ container size.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>Replace vector with list
+ at site S.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">vector</code>
+ operations and access methods.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ For each dynamic instance of <code class="code">vector</code>,
+ record the call context of the constructor. Record the overhead of each
+ <code class="code">insert</code> operation based on current size and insert position.
+ Report instance with high insertion overhead.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ (Sum(cost(vector::method)) - Sum(cost(list::method)), for
+ method in [push_back, insert, erase])
+ + (Cost(iterate vector) - Cost(iterate list))</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;int&gt; v;
+2 for (int i = 0; i &lt; 10000; ++i) {
+3 v.insert(v.begin(), i);
+4 }
+
+foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000
+operations.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.list_to_vector"></a>List to Vector</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect cases where
+ <code class="code">list</code> could be substituted with <code class="code">vector</code> for
+ better performance.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Iterating through a vector is faster than through a list.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>64%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>Replace list with vector
+ at site S.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span><code class="code">vector</code>
+ operations and access methods.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ Issue the advice if there are no <code class="code">insert</code> operations.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ (Sum(cost(vector::method)) - Sum(cost(list::method)), for
+ method in [push_back, insert, erase])
+ + (Cost(iterate vector) - Cost(iterate list))</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 list&lt;int&gt; l;
+...
+2 int sum = 0;
+3 for (list&lt;int&gt;::iterator it = l.begin(); it != l.end(); ++it) {
+4 sum += *it;
+5 }
+
+foo.cc:1: advice: Changing "list" to "vector" will save about 1000000 indirect
+memory references.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.assoc_ord_to_unord"></a>Ordered to Unordered Associative Container</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_ORDERED_TO_UNORDERED</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect cases where ordered
+ associative containers can be replaced with unordered ones.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Insert and search are quicker in a hashtable than in
+ a red-black tree.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>52%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ Replace set with unordered_set at site S.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span>
+ <code class="code">set</code>, <code class="code">multiset</code>, <code class="code">map</code>,
+ <code class="code">multimap</code> methods.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ Issue the advice only if we are not using operator <code class="code">++</code> on any
+ iterator on a particular <code class="code">[multi]set|map</code>.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ (Sum(cost(hashtable::method)) - Sum(cost(rbtree::method)), for
+ method in [insert, erase, find])
+ + (Cost(iterate hashtable) - Cost(iterate rbtree))</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 set&lt;int&gt; s;
+2 for (int i = 0; i &lt; 100000; ++i) {
+3 s.insert(i);
+4 }
+5 int sum = 0;
+6 for (int i = 0; i &lt; 100000; ++i) {
+7 sum += *s.find(i);
+8 }
+</pre><p>
+</p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.algorithms"></a>Algorithms</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_ALGORITHMS</code>.
+ </p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.algorithms.sort"></a>Sort Algorithm Performance</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_SORT</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Give measure of sort algorithm
+ performance based on actual input. For instance, advise Radix Sort over
+ Quick Sort for a particular call context.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ See papers:
+ <a class="ulink" href="http://portal.acm.org/citation.cfm?doid=1065944.1065981" target="_top">
+ A framework for adaptive algorithm selection in STAPL</a> and
+ <a class="ulink" href="http://ieeexplore.ieee.org/search/wrapper.jsp?arnumber=4228227" target="_top">
+ Optimizing Sorting with Machine Learning Algorithms</a>.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>60%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span> Change sort algorithm
+ at site S from X Sort to Y Sort.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span> <code class="code">sort</code>
+ algorithm.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ Issue the advice if the cost model tells us that another sort algorithm
+ would do better on this input. Requires us to know what algorithm we
+ are using in our sort implementation in release mode.</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Runtime(algo) for algo in [radix, quick, merge, ...]</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+</pre><p>
+</p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.locality"></a>Data Locality</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_LOCALITY</code>.
+ </p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.locality.sw_prefetch"></a>Need Software Prefetch</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_SOFTWARE_PREFETCH</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Discover sequences of indirect
+ memory accesses that are not regular, thus cannot be predicted by
+ hardware prefetchers.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Indirect references are hard to predict and are very expensive when they
+ miss in caches.</p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>25%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span> Insert prefetch
+ instruction.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span> Vector iterator and
+ access operator [].
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ First, get cache line size and page size from system.
+ Then record iterator dereference sequences for which the value is a pointer.
+ For each sequence within a container, issue a warning if successive pointer
+ addresses are not within cache lines and do not form a linear pattern
+ (otherwise they may be prefetched by hardware).
+ If they also step across page boundaries, make the warning stronger.
+ </p><p>The same analysis applies to containers other than vector.
+ However, we cannot give the same advice for linked structures, such as list,
+ as there is no random access to the n-th element. The user may still be
+ able to benefit from this information, for instance by employing frays (user
+ level light weight threads) to hide the latency of chasing pointers.
+ </p><p>
+ This analysis is a little oversimplified. A better cost model could be
+ created by understanding the capability of the hardware prefetcher.
+ This model could be trained automatically by running a set of synthetic
+ cases.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Total distance between pointer values of successive elements in vectors
+ of pointers.</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 int zero = 0;
+2 vector&lt;int*&gt; v(10000000, &amp;zero);
+3 for (int k = 0; k &lt; 10000000; ++k) {
+4 v[random() % 10000000] = new int(k);
+5 }
+6 for (int j = 0; j &lt; 10000000; ++j) {
+7 count += (*v[j] == 0 ? 0 : 1);
+8 }
+
+foo.cc:7: advice: Insert prefetch instruction.
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.locality.linked"></a>Linked Structure Locality</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Give measure of locality of
+ objects stored in linked structures (lists, red-black trees and hashtables)
+ with respect to their actual traversal patterns.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>Allocation can be tuned
+ to a specific traversal pattern, to result in better data locality.
+ See paper:
+ <a class="ulink" href="http://www.springerlink.com/content/8085744l00x72662/" target="_top">
+ Custom Memory Allocation for Free</a>.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>30%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span>
+ High scatter score N for container built at site S.
+ Consider changing allocation sequence or choosing a structure conscious
+ allocator.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span> Methods of all
+ containers using linked structures.</p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ First, get cache line size and page size from system.
+ Then record the number of successive elements that are on different line
+ or page, for each traversal method such as <code class="code">find</code>. Give advice
+ only if the ratio between this number and the number of total node hops
+ is above a threshold.</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Sum(same_cache_line(this,previous))</p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+ 1 set&lt;int&gt; s;
+ 2 for (int i = 0; i &lt; 10000000; ++i) {
+ 3 s.insert(i);
+ 4 }
+ 5 set&lt;int&gt; s1, s2;
+ 6 for (int i = 0; i &lt; 10000000; ++i) {
+ 7 s1.insert(i);
+ 8 s2.insert(i);
+ 9 }
+...
+ // Fast, better locality.
+10 for (set&lt;int&gt;::iterator it = s.begin(); it != s.end(); ++it) {
+11 sum += *it;
+12 }
+ // Slow, elements are further apart.
+13 for (set&lt;int&gt;::iterator it = s1.begin(); it != s1.end(); ++it) {
+14 sum += *it;
+15 }
+
+foo.cc:5: advice: High scatter score NNN for set built here. Consider changing
+the allocation sequence or switching to a structure conscious allocator.
+</pre><p>
+</p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.mthread"></a>Multithreaded Data Access</h3></div></div></div><p>
+ The diagnostics in this group are not meant to be implemented short term.
+ They require compiler support to know when container elements are written
+ to. Instrumentation can only tell us when elements are referenced.
+ </p><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_MULTITHREADED</code>.
+ </p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.mthread.ddtest"></a>Data Dependence Violations at Container Level</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_DDTEST</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect container elements
+ that are referenced from multiple threads in the parallel region or
+ across parallel regions.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span>
+ Sharing data between threads requires communication and perhaps locking,
+ which may be expensive.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>?%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span> Change data
+ distribution or parallel algorithm.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span> Container access methods
+ and iterators.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ Keep a shadow for each container. Record iterator dereferences and
+ container member accesses. Issue advice for elements referenced by
+ multiple threads.
+ See paper: <a class="ulink" href="http://portal.acm.org/citation.cfm?id=207110.207148" target="_top">
+ The LRPD test: speculative run-time parallelization of loops with
+ privatization and reduction parallelization</a>.
+ </p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Number of accesses to elements referenced from multiple threads
+ </p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+</pre><p>
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.mthread.false_share"></a>False Sharing</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_FALSE_SHARING</code>.
+ </p></li><li><p><span class="emphasis"><em>Goal:</em></span> Detect elements in the
+ same container which share a cache line, are written by at least one
+ thread, and accessed by different threads.
+ </p></li><li><p><span class="emphasis"><em>Fundamentals:</em></span> Under these assumptions,
+ cache protocols require
+ communication to invalidate lines, which may be expensive.
+ </p></li><li><p><span class="emphasis"><em>Sample runtime reduction:</em></span>68%.
+ </p></li><li><p><span class="emphasis"><em>Recommendation:</em></span> Reorganize container
+ or use padding to avoid false sharing.</p></li><li><p><span class="emphasis"><em>To instrument:</em></span> Container access methods
+ and iterators.
+ </p></li><li><p><span class="emphasis"><em>Analysis:</em></span>
+ First, get the cache line size.
+ For each shared container, record all the associated iterator dereferences
+ and member access methods with the thread id. Compare the address lists
+ across threads to detect references in two different threads to the same
+ cache line. Issue a warning only if the ratio to total references is
+ significant. Do the same for iterator dereference values if they are
+ pointers.</p></li><li><p><span class="emphasis"><em>Cost model:</em></span>
+ Number of accesses to same cache line from different threads.
+ </p></li><li><p><span class="emphasis"><em>Example:</em></span>
+</p><pre class="programlisting">
+1 vector&lt;int&gt; v(2, 0);
+2 #pragma omp parallel for shared(v, SIZE) schedule(static, 1)
+3 for (i = 0; i &lt; SIZE; ++i) {
+4 v[i % 2] += i;
+5 }
+
+OMP_NUM_THREADS=2 ./a.out
+foo.cc:1: advice: Change container structure or padding to avoid false
+sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
+</pre><p>
+</p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.statistics"></a>Statistics</h3></div></div></div><p>
+<span class="emphasis"><em>Switch:</em></span>
+ <code class="code">_GLIBCXX_PROFILE_STATISTICS</code>.
+</p><p>
+ In some cases the cost model may not tell us anything because the costs
+ appear to offset the benefits. Consider the choice between a vector and
+ a list. When there are both inserts and iteration, an automatic advice
+ may not be issued. However, the programmer may still be able to make use
+ of this information in a different way.
+</p><p>
+ This diagnostic will not issue any advice, but it will print statistics for
+ each container construction site. The statistics will contain the cost
+ of each operation actually performed on the container.
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_allocators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Developer Information </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 33. Allocators</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html
index b8d6ff1a129..e1588498eb9 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_containers.html" title="Chapter 33. Containers" /><link rel="prev" href="ext_containers.html" title="Chapter 33. Containers" /><link rel="next" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.sgi"></a>HP/SGI</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_containers.html" title="Chapter 34. Containers" /><link rel="prev" href="ext_containers.html" title="Chapter 34. Containers" /><link rel="next" href="bk01pt12ch34s03.html" title="Deprecated HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><th width="60%" align="center">Chapter 34. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch34s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.sgi"></a>HP/SGI</h2></div></div></div><p>
</p><p>A few extensions and nods to backwards-compatibility have been made with
containers. Those dealing with older SGI-style allocators are dealt with
elsewhere. The remaining ones all deal with bits:
@@ -40,4 +40,4 @@
</p><pre class="programlisting">
size_t _Find_first() const;
size_t _Find_next (size_t prev) const;</pre><p>The same caveat given for the _Unchecked_* functions applies here also.
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch33s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 33. Containers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Deprecated HP/SGI</td></tr></table></div></body></html>
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch34s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 34. Containers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Deprecated HP/SGI</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html
index bf42e104c24..3e3b28d9998 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Deprecated HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_containers.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33s02.html" title="HP/SGI" /><link rel="next" href="ext_utilities.html" title="Chapter 34. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s02.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.deprecated_sgi"></a>Deprecated HP/SGI</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Deprecated HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_containers.html" title="Chapter 34. Containers" /><link rel="prev" href="bk01pt12ch34s02.html" title="HP/SGI" /><link rel="next" href="ext_utilities.html" title="Chapter 35. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch34s02.html">Prev</a> </td><th width="60%" align="center">Chapter 34. Containers</th><td width="20%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.deprecated_sgi"></a>Deprecated HP/SGI</h2></div></div></div><p>
The SGI hashing classes <code class="classname">hash_set</code> and
<code class="classname">hash_set</code> have been deprecated by the
unordered_set, unordered_multiset, unordered_map,
@@ -47,4 +47,4 @@
possibility of pathological cases, you'll probably get better
performance from hash_map.
</em></span>
- </p></blockquote></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch33s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">HP/SGI </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 34. Utilities</td></tr></table></div></body></html>
+ </p></blockquote></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch34s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">HP/SGI </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 35. Utilities</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html
index cae19ae432d..cd976c38f26 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="ext_concurrency.html" title="Chapter 40. Concurrency" /><link rel="next" href="bk01pt12ch40s03.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_concurrency.html" title="Chapter 41. Concurrency" /><link rel="prev" href="ext_concurrency.html" title="Chapter 41. Concurrency" /><link rel="next" href="bk01pt12ch41s03.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 41. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch41s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
implemented via compiler intrinsics (if the underlying host is
capable) or by library fallbacks.</p><p>Compiler intrinsics (builtins) are always preferred. However, as
the compiler builtins for atomics are not universally implemented,
@@ -38,4 +38,4 @@ use this layer. More detail as to the specific interface can be found in the sou
functions, and usage found in the usual &lt;pthread.h&gt; file,
including <code class="code">pthread_t</code>, <code class="code">pthread_once_t</code>, <code class="code">pthread_create</code>,
etc.
-</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch40s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 40. Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Use</td></tr></table></div></body></html>
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch41s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 41. Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Use</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html
index 77b0dea6125..cba67ced6b4 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="bk01pt12ch40s02.html" title="Implementation" /><link rel="next" href="appendix_contributing.html" title="Appendix A.  Contributing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s02.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="ext_concurrency.html" title="Chapter 41. Concurrency" /><link rel="prev" href="bk01pt12ch41s02.html" title="Implementation" /><link rel="next" href="appendix_contributing.html" title="Appendix A.  Contributing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch41s02.html">Prev</a> </td><th width="60%" align="center">Chapter 41. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
</p><pre class="programlisting">
#include &lt;ext/concurrence.h&gt;
@@ -31,7 +31,7 @@ the mutex as control moves out of this block.
concurrence-related errors. These classes
are: <code class="code">__concurrence_lock_error</code>, <code class="code">__concurrence_unlock_error</code>, <code class="code">__concurrence_wait_error</code>,
and <code class="code">__concurrence_broadcast_error</code>.
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch40s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. 
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch41s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. 
Contributing
</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
index f76bab1e466..d166ed5d17f 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="extensions.html" title="Part XII.  Extensions" /><link rel="next" href="ext_compile_checks.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id450786"></a></h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id450207"></a></h2></div></div></div><p>
Here we will make an attempt at describing the non-Standard extensions to
the library. Some of these are from SGI's STL, some of these are GNU's,
and some just seemed to appear on the doorstep.
diff --git a/libstdc++-v3/doc/html/manual/bugs.html b/libstdc++-v3/doc/html/manual/bugs.html
index 01c623516dc..12ed9a966fa 100644
--- a/libstdc++-v3/doc/html/manual/bugs.html
+++ b/libstdc++-v3/doc/html/manual/bugs.html
@@ -123,6 +123,9 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#129" target="_top">129</a>:
<span class="emphasis"><em>Need error indication from seekp() and seekg()</em></span>
</span></dt><dd><p>These functions set <code class="code">failbit</code> on error now.
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#130" target="_top">130</a>:
+ <span class="emphasis"><em>Return type of container::erase(iterator) differs for associative containers</em></span>
+ </span></dt><dd><p>Make member <code class="code">erase</code> return iterator for <code class="code">set</code>, <code class="code">multiset</code>, <code class="code">map</code>, <code class="code">multimap</code>.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#136" target="_top">136</a>:
<span class="emphasis"><em>seekp, seekg setting wrong streams?</em></span>
</span></dt><dd><p><code class="code">seekp</code> should only set the output stream, and
@@ -335,7 +338,7 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#844" target="_top">844</a>:
<span class="emphasis"><em>complex pow return type is ambiguous</em></span>
</span></dt><dd><p>In C++0x mode, remove the pow(complex&lt;T&gt;, int) signature.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#853" target="_top">853</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#853" target="_top">853</a>:
<span class="emphasis"><em>to_string needs updating with zero and one</em></span>
</span></dt><dd><p>Update / add the signatures.
</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="license.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="status.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">License </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Setup</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/codecvt.html b/libstdc++-v3/doc/html/manual/codecvt.html
index 2b06179cdf2..64196b1ece8 100644
--- a/libstdc++-v3/doc/html/manual/codecvt.html
+++ b/libstdc++-v3/doc/html/manual/codecvt.html
@@ -337,41 +337,41 @@ codecvt usage.
</p></li><li><p>
wchar_t/char internal buffers and conversions between
internal/external buffers?
- </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id514958"></a><p><span class="title"><i>
+ </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id493338"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id455172"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id478473"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id448478"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id478501"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id448497"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id497324"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id431624"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id497342"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id431651"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id461154"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id437273"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id409878"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman
- . </span></span></p></div><div class="biblioentry"><a id="id322717"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id390798"></a><p><span class="title"><i>
A brief description of Normative Addendum 1
</i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span><span class="biblioid">
<a class="ulink" href="http://www.lysator.liu.se/c/na1.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id322748"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id389025"></a><p><span class="title"><i>
The Unicode HOWTO
</i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span><span class="biblioid">
<a class="ulink" href="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id448720"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id337800"></a><p><span class="title"><i>
UTF-8 and Unicode FAQ for Unix/Linux
</i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">
diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html
index ff0146ddcef..de09de84158 100644
--- a/libstdc++-v3/doc/html/manual/containers.html
+++ b/libstdc++-v3/doc/html/manual/containers.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="sequences.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.containers"></a>Part VII. 
Containers
- <a id="id430539" class="indexterm"></a>
+ <a id="id421482" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="sequences.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="sequences.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="sequences.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="vector.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="vector.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="associative.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bitset.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitset.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bitset.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="containers_and_c.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sequences.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">messages </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Sequences</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/debug.html b/libstdc++-v3/doc/html/manual/debug.html
index ac6f8077648..bf56f513849 100644
--- a/libstdc++-v3/doc/html/manual/debug.html
+++ b/libstdc++-v3/doc/html/manual/debug.html
@@ -137,7 +137,18 @@
set print vtbl on
set print demangle on
set demangle-style gnu-v3
-</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.exceptions"></a>Tracking uncaught exceptions</h3></div></div></div><p>
+</pre><p>
+ GDB 7.0 will include support for writing pretty-printers in Python.
+ A library of printers for STL classes already exists within the
+ libstdc++ svn repository. For information on enabling these printers,
+ and for other GDB STL support options: please see
+ <a class="ulink" href="http://sourceware.org/gdb/wiki/STLSupport" target="_top"> "GDB Support
+ for STL" </a> in the GDB wiki. Additionally, in-depth
+ documentation and discussion of this feature can be found in the GDB
+ manual. Please see:
+ <a class="ulink" href="http://sourceware.org/gdb/current/onlinedocs//gdb_24.html#SEC260" target="_top">
+ "23.2.2.6 Pretty Printing" </a>
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.exceptions"></a>Tracking uncaught exceptions</h3></div></div></div><p>
The <a class="link" href="verbose_termination.html" title="Verbose Terminate Handler">verbose
termination handler</a> gives information about uncaught
exceptions which are killing the program. It is described in the
@@ -146,6 +157,9 @@
has compile and run-time checks for many containers.
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.compile_time_checks"></a>Compile Time Checking</h3></div></div></div><p> The <a class="link" href="ext_compile_checks.html" title="Chapter 29. Compile Time Checks">Compile-Time
Checks</a> Extension has compile-time checks for many algorithms.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.profile_mode"></a>Profile-based Performance Analysis</h3></div></div></div><p> The <a class="link" href="profile_mode.html" title="Chapter 32. Profile Mode">Profile-based
+ Performance Analysis</a> Extension has performance checks for many
+ algorithms.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_exceptions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. 
Support
diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html
index 3624e126e13..21a447193e1 100644
--- a/libstdc++-v3/doc/html/manual/diagnostics.html
+++ b/libstdc++-v3/doc/html/manual/diagnostics.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="verbose_termination.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="exceptions.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.diagnostics"></a>Part III. 
Diagnostics
- <a id="id427594" class="indexterm"></a>
+ <a id="id432454" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="exceptions.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="exceptions.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="verbose_termination.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="exceptions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Verbose Terminate Handler </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Exceptions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/documentation_style.html b/libstdc++-v3/doc/html/manual/documentation_style.html
index 9490bb6e19a..b58aa894c93 100644
--- a/libstdc++-v3/doc/html/manual/documentation_style.html
+++ b/libstdc++-v3/doc/html/manual/documentation_style.html
@@ -6,7 +6,7 @@
</th><td width="20%" align="right"> <a accesskey="n" href="source_design_notes.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.doc_style"></a>Documentation Style</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="doc_style.doxygen"></a>Doxygen</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"></a>Prerequisites</h4></div></div></div><p>
Prerequisite tools are Bash 2.x,
<a class="ulink" href="http://www.doxygen.org/" target="_top">Doxygen</a>, and
- the <a class="ulink" href="http://www.gnu.org/software/coreutils" target="_top">GNU
+ the <a class="ulink" href="http://www.gnu.org/software/coreutils/" target="_top">GNU
coreutils</a>. (GNU versions of find, xargs, and possibly
sed and grep are used, just because the GNU versions make
things very easy.)
@@ -211,11 +211,11 @@ Complete details on Docbook markup can be found in the DocBook Element
Reference, <a class="ulink" href="http://www.docbook.org/tdg/en/html/part2.html" target="_top">online</a>. An
incomplete reference for HTML to Docbook conversion is detailed in the
table below.
-</p><div class="table"><a id="id447935"></a><p class="title"><b>Table A.1. HTML to Docbook XML markup comparison</b></p><div class="table-contents"><table summary="HTML to Docbook XML markup comparison" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">XML</th></tr></thead><tbody><tr><td align="left">&lt;p&gt;</td><td align="left">&lt;para&gt;</td></tr><tr><td align="left">&lt;pre&gt;</td><td align="left">&lt;computeroutput&gt;, &lt;programlisting&gt;,
+</p><div class="table"><a id="id431910"></a><p class="title"><b>Table A.1. HTML to Docbook XML markup comparison</b></p><div class="table-contents"><table summary="HTML to Docbook XML markup comparison" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">XML</th></tr></thead><tbody><tr><td align="left">&lt;p&gt;</td><td align="left">&lt;para&gt;</td></tr><tr><td align="left">&lt;pre&gt;</td><td align="left">&lt;computeroutput&gt;, &lt;programlisting&gt;,
&lt;literallayout&gt;</td></tr><tr><td align="left">&lt;ul&gt;</td><td align="left">&lt;itemizedlist&gt;</td></tr><tr><td align="left">&lt;ol&gt;</td><td align="left">&lt;orderedlist&gt;</td></tr><tr><td align="left">&lt;il&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;dl&gt;</td><td align="left">&lt;variablelist&gt;</td></tr><tr><td align="left">&lt;dt&gt;</td><td align="left">&lt;term&gt;</td></tr><tr><td align="left">&lt;dd&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;a href=""&gt;</td><td align="left">&lt;ulink url=""&gt;</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">&lt;literal&gt;, &lt;programlisting&gt;</td></tr><tr><td align="left">&lt;strong&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">"</td><td align="left">&lt;quote&gt;</td></tr></tbody></table></div></div><br class="table-break" /><p>
And examples of detailed markup for which there are no real HTML
equivalents are listed in the table below.
-</p><div class="table"><a id="id458695"></a><p class="title"><b>Table A.2. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left">&lt;structname&gt;</td><td align="left">&lt;structname&gt;char_traits&lt;/structname&gt;</td></tr><tr><td align="left">&lt;classname&gt;</td><td align="left">&lt;classname&gt;string&lt;/classname&gt;</td></tr><tr><td align="left">&lt;function&gt;</td><td align="left">
+</p><div class="table"><a id="id514274"></a><p class="title"><b>Table A.2. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left">&lt;structname&gt;</td><td align="left">&lt;structname&gt;char_traits&lt;/structname&gt;</td></tr><tr><td align="left">&lt;classname&gt;</td><td align="left">&lt;classname&gt;string&lt;/classname&gt;</td></tr><tr><td align="left">&lt;function&gt;</td><td align="left">
<p>&lt;function&gt;clear()&lt;/function&gt;</p>
<p>&lt;function&gt;fs.clear()&lt;/function&gt;</p>
</td></tr><tr><td align="left">&lt;type&gt;</td><td align="left">&lt;type&gt;long long&lt;/type&gt;</td></tr><tr><td align="left">&lt;varname&gt;</td><td align="left">&lt;varname&gt;fs&lt;/varname&gt;</td></tr><tr><td align="left">&lt;literal&gt;</td><td align="left">
diff --git a/libstdc++-v3/doc/html/manual/ext_algorithms.html b/libstdc++-v3/doc/html/manual/ext_algorithms.html
index b77a24a50ce..eadb4441b1e 100644
--- a/libstdc++-v3/doc/html/manual/ext_algorithms.html
+++ b/libstdc++-v3/doc/html/manual/ext_algorithms.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 35. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_utilities.html" title="Chapter 34. Utilities" /><link rel="next" href="ext_numerics.html" title="Chapter 36. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 35. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 36. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_utilities.html" title="Chapter 35. Utilities" /><link rel="next" href="ext_numerics.html" title="Chapter 37. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 36. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.algorithms"></a>Chapter 35. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.algorithms"></a>Chapter 36. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
and count_if. The standard versions return their results. The
additional signatures return void, but take a final parameter by
reference to which they assign their results, e.g.,
@@ -20,4 +20,4 @@
</p><pre class="programlisting">
lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
_InputIter2 first2, _InputIter2 last2)</pre><p>which does... what?
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 34. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 36. Numerics</td></tr></table></div></body></html>
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 35. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 37. Numerics</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_allocators.html b/libstdc++-v3/doc/html/manual/ext_allocators.html
index 91d38b5b990..cec9f8228a0 100644
--- a/libstdc++-v3/doc/html/manual/ext_allocators.html
+++ b/libstdc++-v3/doc/html/manual/ext_allocators.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 32. Allocators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bk01pt12ch31s05.html" title="Testing" /><link rel="next" href="bitmap_allocator.html" title="bitmap_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 32. Allocators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 33. Allocators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bk01pt12ch32s07.html" title="Diagnostics" /><link rel="next" href="bitmap_allocator.html" title="bitmap_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 33. Allocators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32s07.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator"></a>Chapter 32. Allocators</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.mt"></a>mt_allocator</h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator"></a>Chapter 33. Allocators</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.mt"></a>mt_allocator</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.intro"></a>Intro</h3></div></div></div><p>
The mt allocator [hereinafter referred to simply as "the allocator"]
is a fixed size (power of two) allocator that was initially
@@ -394,4 +394,4 @@ mutex to be locked) this operation is also made in chunks of blocks
a threads freelist mentioned above). The "formula" used can probably
be improved to further reduce the risk of blocks being "bounced back
and forth" between freelists.
-</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> bitmap_allocator</td></tr></table></div></body></html>
+</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch32s07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Diagnostics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> bitmap_allocator</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_concurrency.html b/libstdc++-v3/doc/html/manual/ext_concurrency.html
index b9d7d3503e8..9fa8f74d7b1 100644
--- a/libstdc++-v3/doc/html/manual/ext_concurrency.html
+++ b/libstdc++-v3/doc/html/manual/ext_concurrency.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 40. Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_demangling.html" title="Chapter 39. Demangling" /><link rel="next" href="bk01pt12ch40s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 40. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 41. Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_demangling.html" title="Chapter 40. Demangling" /><link rel="next" href="bk01pt12ch41s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 41. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 40. Concurrency</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file &lt;ext/concurrence.h&gt; contains all the higher-level
+</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch41s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 41. Concurrency</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s03.html">Use</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file &lt;ext/concurrence.h&gt; contains all the higher-level
constructs for playing with threads. In contrast to the atomics layer,
the concurrence layer consists largely of types. All types are defined within <code class="code">namespace __gnu_cxx</code>.
</p><p>
@@ -88,4 +88,4 @@ _GLIBCXX_WRITE_MEM_BARRIER
</p><p>
Which expand to the appropriate write and read barrier required by the
host hardware and operating system.
-</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch40s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 39. Demangling </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html>
+</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch41s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 40. Demangling </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_containers.html b/libstdc++-v3/doc/html/manual/ext_containers.html
index 44d7f17e8cd..47ada7b5db6 100644
--- a/libstdc++-v3/doc/html/manual/ext_containers.html
+++ b/libstdc++-v3/doc/html/manual/ext_containers.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 33. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bitmap_allocator.html" title="bitmap_allocator" /><link rel="next" href="bk01pt12ch33s02.html" title="HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 33. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 34. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bitmap_allocator.html" title="bitmap_allocator" /><link rel="next" href="bk01pt12ch34s02.html" title="HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 34. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers"></a>Chapter 33. Containers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch34s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers"></a>Chapter 34. Containers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s03.html">Deprecated HP/SGI</a></span></dt></dl></div><p>
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.pbds"></a>Policy Based Data Structures</h2></div></div></div><p>
<a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/index.html" target="_top">More details here</a>.
- </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch33s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitmap_allocator </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> HP/SGI</td></tr></table></div></body></html>
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch34s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitmap_allocator </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> HP/SGI</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_demangling.html b/libstdc++-v3/doc/html/manual/ext_demangling.html
index 5eaf54a9804..46866b82bf9 100644
--- a/libstdc++-v3/doc/html/manual/ext_demangling.html
+++ b/libstdc++-v3/doc/html/manual/ext_demangling.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 39. Demangling</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_io.html" title="Chapter 38. Input and Output" /><link rel="next" href="ext_concurrency.html" title="Chapter 40. Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 39. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 40. Demangling</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_io.html" title="Chapter 39. Input and Output" /><link rel="next" href="ext_concurrency.html" title="Chapter 41. Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 40. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.demangle"></a>Chapter 39. Demangling</h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.demangle"></a>Chapter 40. Demangling</h2></div></div></div><p>
Transforming C++ ABI identifiers (like RTTI symbols) into the
original C++ source identifiers is called
“<span class="quote">demangling.</span>”
@@ -71,4 +71,4 @@ int main()
be writing C++ in order to demangle C++. (That also means we have to
use crummy memory management facilities, so don't forget to free()
the returned char array.)
- </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 38. Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 40. Concurrency</td></tr></table></div></body></html>
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 39. Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 41. Concurrency</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_io.html b/libstdc++-v3/doc/html/manual/ext_io.html
index 53618a04975..d257c2c51e5 100644
--- a/libstdc++-v3/doc/html/manual/ext_io.html
+++ b/libstdc++-v3/doc/html/manual/ext_io.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 38. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_iterators.html" title="Chapter 37. Iterators" /><link rel="next" href="ext_demangling.html" title="Chapter 39. Demangling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 38. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 39. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_iterators.html" title="Chapter 38. Iterators" /><link rel="next" href="ext_demangling.html" title="Chapter 40. Demangling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 39. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.io"></a>Chapter 38. Input and Output</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.io"></a>Chapter 39. Input and Output</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p>
Extensions allowing <code class="code">filebuf</code>s to be constructed from
"C" types like FILE*s and file descriptors.
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.io.filebuf_derived"></a>Derived filebufs</h2></div></div></div><p>The v2 library included non-standard extensions to construct
@@ -47,4 +47,4 @@
call) then you might be interested in Henry Suter's RWLock class.
</p><p>
- </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 37. Iterators </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 39. Demangling</td></tr></table></div></body></html>
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 38. Iterators </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 40. Demangling</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_iterators.html b/libstdc++-v3/doc/html/manual/ext_iterators.html
index 51b0e0f12bd..20be5ac7831 100644
--- a/libstdc++-v3/doc/html/manual/ext_iterators.html
+++ b/libstdc++-v3/doc/html/manual/ext_iterators.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 37. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_numerics.html" title="Chapter 36. Numerics" /><link rel="next" href="ext_io.html" title="Chapter 38. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 37. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 38. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_numerics.html" title="Chapter 37. Numerics" /><link rel="next" href="ext_io.html" title="Chapter 39. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 38. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.iterators"></a>Chapter 37. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.iterators"></a>Chapter 38. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the
original HP STL implementation (the language wasn't rich enough at the
time). For backwards compatibility, base classes are provided which
declare the same nested typedefs:
@@ -11,4 +11,4 @@
two iterators and returns a result. It is extended by another signature
which takes two iterators and a reference to a result. The result is
modified, and the function returns nothing.
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 36. Numerics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 38. Input and Output</td></tr></table></div></body></html>
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 37. Numerics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 39. Input and Output</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_numerics.html b/libstdc++-v3/doc/html/manual/ext_numerics.html
index f1bb1ac93eb..dc47b617dbf 100644
--- a/libstdc++-v3/doc/html/manual/ext_numerics.html
+++ b/libstdc++-v3/doc/html/manual/ext_numerics.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 36. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_algorithms.html" title="Chapter 35. Algorithms" /><link rel="next" href="ext_iterators.html" title="Chapter 37. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 36. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 37. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="ext_algorithms.html" title="Chapter 36. Algorithms" /><link rel="next" href="ext_iterators.html" title="Chapter 38. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 37. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"></a>Chapter 36. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as accumulate, are extended
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"></a>Chapter 37. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as accumulate, are extended
with the following functions:
</p><pre class="programlisting">
power (x, n);
@@ -17,4 +17,4 @@
That is, it assigns value to *first, value + 1 to *(first + 1) and so
on." Quoted from SGI documentation.
</p><pre class="programlisting">
- void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 35. Algorithms </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 37. Iterators</td></tr></table></div></body></html>
+ void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 36. Algorithms </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 38. Iterators</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/ext_utilities.html b/libstdc++-v3/doc/html/manual/ext_utilities.html
index 2b432e5c56f..cf475c6f064 100644
--- a/libstdc++-v3/doc/html/manual/ext_utilities.html
+++ b/libstdc++-v3/doc/html/manual/ext_utilities.html
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 34. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /><link rel="next" href="ext_algorithms.html" title="Chapter 35. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 34. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s03.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 35. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bk01pt12ch34s03.html" title="Deprecated HP/SGI" /><link rel="next" href="ext_algorithms.html" title="Chapter 36. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 35. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch34s03.html">Prev</a> </td><th width="60%" align="center">Part XII. 
Extensions
-</th><td width="20%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.util"></a>Chapter 34. Utilities</h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.util"></a>Chapter 35. Utilities</h2></div></div></div><p>
The &lt;functional&gt; header contains many additional functors
and helper functions, extending section 20.3. They are
implemented in the file stl_function.h:
@@ -38,4 +38,4 @@ get_temporary_buffer(5, (int*)0);
</p><p>
The specialized algorithms of section 20.4.4 are extended with
<code class="code">uninitialized_copy_n</code>. *
-</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch33s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Deprecated HP/SGI </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 35. Algorithms</td></tr></table></div></body></html>
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch34s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Deprecated HP/SGI </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 36. Algorithms</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html
index a757f077356..90c2b048ee1 100644
--- a/libstdc++-v3/doc/html/manual/extensions.html
+++ b/libstdc++-v3/doc/html/manual/extensions.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.ext"></a>Part XII. 
Extensions
- <a id="id450777" class="indexterm"></a>
-</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_allocators.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ext_containers.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Performance </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
+ <a id="id450198" class="indexterm"></a>
+</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="profile_mode.html">32. Profile Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s02.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s04.html">Empirical Cost Model</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_allocators.html">33. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ext_containers.html">34. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">35. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">36. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">37. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">38. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">39. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">40. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">41. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s03.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Performance </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/facets.html b/libstdc++-v3/doc/html/manual/facets.html
index 48a6a384825..a23ee847975 100644
--- a/libstdc++-v3/doc/html/manual/facets.html
+++ b/libstdc++-v3/doc/html/manual/facets.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI.  Localization" /><link rel="prev" href="locales.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="locales.html">Prev</a> </td><th width="60%" align="center">Part VI. 
Localization
-</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id435289"></a>Specializations</h4></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id456506"></a>Specializations</h4></div></div></div><p>
For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
conversions are made between the internal character set (always UCS4
on GNU/Linux) and whatever the currently selected locale for the
@@ -50,25 +50,25 @@ characters.
</p></li><li><p>
Rename abstract base class. See if just smash-overriding is a
better approach. Clarify, add sanity to naming.
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id444358"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id394298"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id455494"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id480756"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id440437"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id396720"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id440455"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id396738"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id440473"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id395771"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id517128"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id412160"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id438741"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id465171"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html
index ed795fc6e81..58b373b1260 100644
--- a/libstdc++-v3/doc/html/manual/intro.html
+++ b/libstdc++-v3/doc/html/manual/intro.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"></a>Part I. 
Introduction
- <a id="id387018" class="indexterm"></a>
-</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
+ <a id="id431712" class="indexterm"></a>
+</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/io.html b/libstdc++-v3/doc/html/manual/io.html
index b5a30497632..121c8be1636 100644
--- a/libstdc++-v3/doc/html/manual/io.html
+++ b/libstdc++-v3/doc/html/manual/io.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="iostream_objects.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.io"></a>Part XI. 
Input and Output
- <a id="id460605" class="indexterm"></a>
+ <a id="id412720" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="iostream_objects.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="streambufs.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="stringstreams.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="stringstreams.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="fstreams.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="fstreams.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="io_and_c.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="io_and_c.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="iostream_objects.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C99 </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Iostream Objects</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/io_and_c.html b/libstdc++-v3/doc/html/manual/io_and_c.html
index e85fe0d00d2..e5fe3c77da2 100644
--- a/libstdc++-v3/doc/html/manual/io_and_c.html
+++ b/libstdc++-v3/doc/html/manual/io_and_c.html
@@ -4,7 +4,7 @@
Input and Output
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch28s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.c"></a>Chapter 28. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="io_and_c.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.c.FILE"></a>Using FILE* and file descriptors</h2></div></div></div><p>
- See the <a class="link" href="ext_io.html" title="Chapter 38. Input and Output">extensions</a> for using
+ See the <a class="link" href="ext_io.html" title="Chapter 39. Input and Output">extensions</a> for using
<span class="type">FILE</span> and <span class="type">file descriptors</span> with
<code class="classname">ofstream</code> and
<code class="classname">ifstream</code>.
diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html
index 046bf075b9b..c168b0e1787 100644
--- a/libstdc++-v3/doc/html/manual/iterators.html
+++ b/libstdc++-v3/doc/html/manual/iterators.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitset.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.iterators"></a>Part VIII. 
Iterators
- <a id="id388807" class="indexterm"></a>
+ <a id="id511191" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitset.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitset </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Predefined</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/locales.html b/libstdc++-v3/doc/html/manual/locales.html
index 49634676312..87b7c2b7bbc 100644
--- a/libstdc++-v3/doc/html/manual/locales.html
+++ b/libstdc++-v3/doc/html/manual/locales.html
@@ -398,25 +398,25 @@ global locale" (emphasis Paolo), that is:
What should non-required facet instantiations do? If the
generic implementation is provided, then how to end-users
provide specializations?
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id419927"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id388197"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id426714"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id403972"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id426743"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id404001"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id438110"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id450687"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id438128"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id450705"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id516788"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id429438"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id532385"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id405937"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html
index 5f30a5fb542..35b18f8617f 100644
--- a/libstdc++-v3/doc/html/manual/localization.html
+++ b/libstdc++-v3/doc/html/manual/localization.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="locales.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.localization"></a>Part VI. 
Localization
- <a id="id453876" class="indexterm"></a>
+ <a id="id421930" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="locales.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="locales.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="locales.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="facets.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="locales.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CString (MFC) </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Locales</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html
index 25e863d9e89..035b50d5836 100644
--- a/libstdc++-v3/doc/html/manual/memory.html
+++ b/libstdc++-v3/doc/html/manual/memory.html
@@ -93,7 +93,7 @@
or loading and unloading shared objects in memory. As such, using
caching allocators on systems that do not support
<code class="function">abi::__cxa_atexit</code> is not recommended.
- </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id387134"></a>Interface Design</h4></div></div></div><p>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id448064"></a>Interface Design</h4></div></div></div><p>
The only allocator interface that
is support is the standard C++ interface. As such, all STL
containers have been adjusted, and all external allocators have
@@ -106,7 +106,7 @@
</p><p>
The base class that <code class="classname">allocator</code> is derived from
may not be user-configurable.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511422"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id419395"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
It's difficult to pick an allocation strategy that will provide
maximum utility, without excessively penalizing some behavior. In
fact, it's difficult just deciding which typical actions to measure
@@ -143,7 +143,7 @@
The current default choice for
<code class="classname">allocator</code> is
<code class="classname">__gnu_cxx::new_allocator</code>.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id532133"></a>Disabling Memory Caching</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id392353"></a>Disabling Memory Caching</h4></div></div></div><p>
In use, <code class="classname">allocator</code> may allocate and
deallocate using implementation-specified strategies and
heuristics. Because of this, every call to an allocator object's
@@ -308,11 +308,11 @@
A high-performance allocator that uses a bit-map to keep track
of the used and unused memory locations. It has its own
documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>.
- </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id426851"></a><p><span class="title"><i>
+ </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id401721"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
</i>. </span>
isoc++_1998
- <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id426866"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
+ <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id401736"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
</i>. </span>
austernm
<span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
@@ -320,28 +320,28 @@
. </span></span><span class="biblioid">
<a class="ulink" href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id495648"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id478919"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
emeryb
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.cs.umass.edu/~emery/hoard/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id459688"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id447245"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
bergerzorn
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span><span class="biblioid">
<a class="ulink" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id516756"></a><p><span class="title"><i>Allocator Types</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id427350"></a><p><span class="title"><i>Allocator Types</i>. </span>
kreftlanger
<span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal
. </span></span><span class="biblioid">
<a class="ulink" href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id459976"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id291159"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
tcpl
<span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id451788"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
+ . </span></span></p></div><div class="biblioentry"><a id="id420450"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
yenf
<span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span><span class="copyright">Copyright © . </span><span class="biblioid">
<a class="ulink" href="http://home.earthlink.net/~brimar/yalloc/" target="_top">
diff --git a/libstdc++-v3/doc/html/manual/messages.html b/libstdc++-v3/doc/html/manual/messages.html
index eb5b9f04c9a..64b6d6d6c48 100644
--- a/libstdc++-v3/doc/html/manual/messages.html
+++ b/libstdc++-v3/doc/html/manual/messages.html
@@ -241,38 +241,38 @@ void test01()
model. As of this writing, it is unknown how to query to see
if a specified message catalog exists using the gettext
package.
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id442887"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id472238"></a><p><span class="title"><i>
The GNU C Library
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization
- . </span></p></div><div class="biblioentry"><a id="id417173"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id414678"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id417202"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id412595"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id468091"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id412614"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id468109"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id400869"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opengroup.org/austin/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id524743"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id400897"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id450555"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id426571"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman
- . </span></span></p></div><div class="biblioentry"><a id="id486251"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id414262"></a><p><span class="title"><i>
Java 2 Platform, Standard Edition, v 1.3.1 API Specification
</i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat,
java.util.Locale, java.util.ResourceBundle. </span><span class="biblioid">
<a class="ulink" href="http://java.sun.com/reference/api/index.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id486272"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id414283"></a><p><span class="title"><i>
GNU gettext tools, version 0.10.38, Native Language Support
Library and Tools.
</i>. </span><span class="biblioid">
diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html
index e4339376002..7738f38215b 100644
--- a/libstdc++-v3/doc/html/manual/numerics.html
+++ b/libstdc++-v3/doc/html/manual/numerics.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="complex.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.numerics"></a>Part X. 
Numerics
- <a id="id443615" class="indexterm"></a>
+ <a id="id399502" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="complex.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="complex.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="generalized_numeric_operations.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="numerics_and_c.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="complex.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. Mutating </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Complex</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html
index cbcdebaf9b9..46af419a9ae 100644
--- a/libstdc++-v3/doc/html/manual/parallel_mode.html
+++ b/libstdc++-v3/doc/html/manual/parallel_mode.html
@@ -13,11 +13,11 @@ explicit source declaration or by compiling existing sources with a
specific compiler flag.
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include
<code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::accumulate</code></p></li><li><p><code class="function">std::adjacent_difference</code></p></li><li><p><code class="function">std::inner_product</code></p></li><li><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include
-<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id426541"></a><p><span class="title"><i>
+<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id431585"></a><p><span class="title"><i>
Parallelization of Bulk Operations for STL Dictionaries
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
- . </span></span></p></div><div class="biblioentry"><a id="id426587"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id389946"></a><p><span class="title"><i>
The Multi-Core Standard Template Library
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Euro-Par 2007: Parallel Processing. (LNCS 4641)
diff --git a/libstdc++-v3/doc/html/manual/profile_mode.html b/libstdc++-v3/doc/html/manual/profile_mode.html
new file mode 100644
index 00000000000..fca37908a35
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/profile_mode.html
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 32. Profile Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII.  Extensions" /><link rel="prev" href="bk01pt12ch31s05.html" title="Testing" /><link rel="next" href="bk01pt12ch32s02.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 32. Profile Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><th width="60%" align="center">Part XII. 
+ Extensions
+
+</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.profile_mode"></a>Chapter 32. Profile Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s02.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s04.html">Empirical Cost Model</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.intro"></a>Intro</h2></div></div></div><p>
+ <span class="emphasis"><em>Goal: </em></span>Give performance improvement advice based on
+ recognition of suboptimal usage patterns of the standard library.
+ </p><p>
+ <span class="emphasis"><em>Method: </em></span>Wrap the standard library code. Insert
+ calls to an instrumentation library to record the internal state of
+ various components at interesting entry/exit points to/from the standard
+ library. Process trace, recognize suboptimal patterns, give advice.
+ For details, see
+ <a class="ulink" href="http://dx.doi.org/10.1109/CGO.2009.36" target="_top">paper presented at
+ CGO 2009</a>.
+ </p><p>
+ <span class="emphasis"><em>Strengths: </em></span>
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+ Unintrusive solution. The application code does not require any
+ modification.
+ </p></li><li><p> The advice is call context sensitive, thus capable of
+ identifying precisely interesting dynamic performance behavior.
+ </p></li><li><p>
+ The overhead model is pay-per-view. When you turn off a diagnostic class
+ at compile time, its overhead disappears.
+ </p></li></ul></div><p>
+ </p><p>
+ <span class="emphasis"><em>Drawbacks: </em></span>
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+ You must recompile the application code with custom options.
+ </p></li><li><p>You must run the application on representative input.
+ The advice is input dependent.
+ </p></li><li><p>
+ The execution time will increase, in some cases by factors.
+ </p></li></ul></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.using"></a>Using the Profile Mode</h3></div></div></div><p>
+ This is the anticipated common workflow for program <code class="code">foo.cc</code>:
+</p><pre class="programlisting">
+$ cat foo.cc
+#include &lt;vector&gt;
+int main() {
+ vector&lt;int&gt; v;
+ for (int k = 0; k &lt; 1024; ++k) v.insert(v.begin(), k);
+}
+
+$ g++ -D_GLIBCXX_PROFILE foo.cc
+$ ./a.out
+$ cat libstdcxx-profile.txt
+vector-to-list: improvement = 5: call stack = 0x804842c ...
+ : advice = change std::vector to std::list
+vector-size: improvement = 3: call stack = 0x804842c ...
+ : advice = change initial container size from 0 to 1024
+</pre><p>
+ </p><p>
+ Anatomy of a warning:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Warning id. This is a short descriptive string for the class
+ that this warning belongs to. E.g., "vector-to-list".
+ </p></li><li><p>
+ Estimated improvement. This is an approximation of the benefit expected
+ from implementing the change suggested by the warning. It is given on
+ a log10 scale. Negative values mean that the alternative would actually
+ do worse than the current choice.
+ In the example above, 5 comes from the fact that the overhead of
+ inserting at the beginning of a vector vs. a list is around 1024 * 1024 / 2,
+ which is around 10e5. The improvement from setting the initial size to
+ 1024 is in the range of 10e3, since the overhead of dynamic resizing is
+ linear in this case.
+ </p></li><li><p>
+ Call stack. Currently, the addresses are printed without
+ symbol name or code location attribution.
+ Users are expected to postprocess the output using, for instance, addr2line.
+ </p></li><li><p>
+ The warning message. For some warnings, this is static text, e.g.,
+ "change vector to list". For other warnings, such as the one above,
+ the message contains numeric advice, e.g., the suggested initial size
+ of the hashtable.
+ </p></li></ul></div><p>
+ </p><p>Two files are generated. <code class="code">libstdcxx-profile.txt</code>
+ contains human readable advice. <code class="code">libstdcxx-profile.raw</code>
+ contains implementation specific data about each diagnostic.
+ Their format is not documented. They are sufficient to generate
+ all the advice given in <code class="code">libstdcxx-profile.txt</code>. The advantage
+ of keeping this raw format is that traces from multiple executions can
+ be aggregated simply by concatenating the raw traces. We intend to
+ offer an external utility program that can issue advice from a trace.
+ </p><p>Advice is given regardless whether the transformation is valid.
+ For instance, we advise changing a map to an unordered_map even if the
+ application semantics require that data be ordered.
+ We believe such warnings can help users understand the performance
+ behavior of their application better, which can lead to changes
+ at a higher abstraction level.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.tuning"></a>Tuning the Profile Mode</h3></div></div></div><p>Compile time switches and environment variables (see also file
+ profiler.h). Unless specified otherwise, they can be set at compile time
+ using -D_&lt;name&gt; or by setting variable &lt;name&gt;
+ in the environment where the program is run, before starting execution.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ <code class="code">[NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>:
+ enable/disable specific diagnostics.
+ See section Diagnostics for possible values.
+ (Environment variables not supported.)
+ </p></li><li><p>
+ <code class="code">GLIBCXX_PROFILE_TRACE_PATH_ROOT</code>: set an alternative root
+ path for the output files.
+ </p></li><li><p>GLIBCXX_PROFILE_MAX_WARN_COUNT: set it to the maximum
+ number of warnings desired. The default value is 10.</p></li><li><p>
+ <code class="code">GLIBCXX_PROFILE_MAX_STACK_DEPTH</code>: if set to 0,
+ the advice will
+ be collected and reported for the program as a whole, and not for each
+ call context.
+ This could also be used in continuous regression tests, where you
+ just need to know whether there is a regression or not.
+ The default value is 32.
+ </p></li><li><p>
+ <code class="code">GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC</code>:
+ set a limit on how much memory to use for the accounting tables for each
+ diagnostic type. When this limit is reached, new events are ignored
+ until the memory usage decreases under the limit. Generally, this means
+ that newly created containers will not be instrumented until some
+ live containers are deleted. The default is 128 MB.
+ </p></li><li><p>
+ <code class="code">GLIBCXX_PROFILE_NOTHREADS</code>:
+ Make the library not use threads. Otherwise, pthread mutexes are used
+ to protect access to internal data structures. This should be useful
+ only if the program is single threaded and you want to avoid the overhead
+ of aquiring/releasing locks unnecessarily.
+ (Environment variable not supported.)
+ </p></li><li><p>
+ <code class="code">HAVE_EXECINFO_H</code>:
+ This name should be defined at library configuration time.
+ If your library was configured without <code class="code">execinfo.h</code>, but
+ you have it in your include path, you can define it explicitly. Without
+ it, advice is collected for the program as a whole, and not for each
+ call context.
+ (Environment variable not supported.)
+ </p></li></ul></div><p>
+ </p></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id412060"></a><p><span class="title"><i>
+ Perflint: A Context Sensitive Performance Advisor for C++ Programs
+ </i>. </span><span class="author"><span class="firstname">Lixia</span> <span class="surname">Liu</span>. </span><span class="author"><span class="firstname">Silvius</span> <span class="surname">Rus</span>. </span><span class="copyright">Copyright © 2009 . </span><span class="publisher"><span class="publishername">
+ Proceedings of the 2009 International Symposium on Code Generation
+ and Optimization
+ . </span></span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch32s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/shared_ptr.html b/libstdc++-v3/doc/html/manual/shared_ptr.html
index 2561558047b..ea7e3208f9d 100644
--- a/libstdc++-v3/doc/html/manual/shared_ptr.html
+++ b/libstdc++-v3/doc/html/manual/shared_ptr.html
@@ -29,7 +29,7 @@ drops to zero.
Derived classes override those functions to destroy resources in a context
where the correct dynamic type is known. This is an application of the
technique known as type erasure.
- </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id436681"></a>Class Hierarchy</h4></div></div></div><p>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id397705"></a>Class Hierarchy</h4></div></div></div><p>
A <code class="classname">shared_ptr&lt;T&gt;</code> contains a pointer of
type <span class="type">T*</span> and an object of type
<code class="classname">__shared_count</code>. The shared_count contains a
@@ -71,7 +71,7 @@ be forwarded to <span class="type">Tp</span>'s constructor.
Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the
type of object, not the type of pointer; this is purely a convenience
that simplifies the implementation slightly.
- </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id451950"></a>Thread Safety</h4></div></div></div><p>
+ </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id455193"></a>Thread Safety</h4></div></div></div><p>
The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x
with support for rvalue-references and the other features from
N2351. As with other libstdc++ headers shared by TR1 and C++0x,
@@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of
shared_ptr in libstdc++ the compiler and library are fixed, which
makes things much simpler: we have an atomic CAS or we don't, see Lock
Policy below for details.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id420332"></a>Selecting Lock Policy</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id410726"></a>Selecting Lock Policy</h4></div></div></div><p>
</p><p>
There is a single <code class="classname">_Sp_counted_base</code> class,
which is a template parameterized on the enum
@@ -170,7 +170,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod
<code class="filename">ext/atomicity.h</code>, which detect if the program
is multi-threaded. If only one thread of execution exists in
the program then less expensive non-atomic operations are used.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id515700"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id477345"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy
below) and <code class="classname">__shared_count</code> are implemented separately for C++0x
and TR1, in <code class="filename">bits/boost_sp_shared_count.h</code> and
@@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to
change unless bug fixes require it. If the code that is common to both
C++0x and TR1 modes needs to diverge further then it might be necessary to
duplicate additional classes and only make changes to the C++0x versions.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id486010"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474156"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
<code class="code">const_pointer_cast</code></span></dt><dd><p>
As noted in N2351, these functions can be implemented non-intrusively using
the alias constructor. However the aliasing constructor is only available
@@ -214,10 +214,10 @@ is called. Users should not try to use this.
As well as the extra constructors, this implementation also needs some
members of _Sp_counted_deleter to be protected where they could otherwise
be private.
- </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id478324"></a>Examples</h4></div></div></div><p>
+ </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id498188"></a>Examples</h4></div></div></div><p>
Examples of use can be found in the testsuite, under
<code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id505148"></a>Unresolved Issues</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id461223"></a>Unresolved Issues</h4></div></div></div><p>
The resolution to C++ Standard Library issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674" target="_top">674</a>,
"shared_ptr interface changes for consistency with N1856" will
need to be implemented after it is accepted into the working
@@ -265,7 +265,7 @@ be private.
code to work with, Peter Dimov in particular for his help and
invaluable advice on thread safety. Phillip Jordan and Paolo
Carlini for the lock policy implementation.
- </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id450490"></a><p>[<abbr class="abbrev">
+ </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id414603"></a><p>[<abbr class="abbrev">
n2351
</abbr>] <span class="title"><i>
Improving shared_ptr for C++0x, Revision 2
@@ -274,7 +274,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id450514"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id414627"></a><p>[<abbr class="abbrev">
n2456
</abbr>] <span class="title"><i>
C++ Standard Library Active Issues List (Revision R52)
@@ -283,7 +283,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id419756"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id469083"></a><p>[<abbr class="abbrev">
n2461
</abbr>] <span class="title"><i>
Working Draft, Standard for Programming Language C++
@@ -292,7 +292,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id509508"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id416974"></a><p>[<abbr class="abbrev">
boostshared_ptr
</abbr>] <span class="title"><i>
Boost C++ Libraries documentation - shared_ptr class template
diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html
index 2b326459013..beca228c986 100644
--- a/libstdc++-v3/doc/html/manual/spine.html
+++ b/libstdc++-v3/doc/html/manual/spine.html
@@ -2,12 +2,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="intro.html" title="Part I.  Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual-index"></a>The GNU C++ Library</h1></div><div><p class="copyright">Copyright © 2009
<a class="ulink" href="http://www.fsf.org" target="_top">FSF</a>
- </p></div><div><div class="legalnotice"><a id="id426452"></a><p>
+ </p></div><div><div class="legalnotice"><a id="id451530"></a><p>
<a class="link" href="license.html" title="License">License</a>
</p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="intro.html">I.
Introduction
-</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II.
+</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II.
Support
</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="fundamental_types.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="fundamental_types.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="dynamic_memory.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="termination.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="verbose_termination.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III.
@@ -40,7 +40,7 @@
</a></span></dt><dd><dl><dt><span class="chapter"><a href="iostream_objects.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="streambufs.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="stringstreams.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="stringstreams.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="fstreams.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="fstreams.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="io_and_c.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="io_and_c.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="extensions.html">XII.
Extensions
-</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_allocators.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ext_containers.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A.
+</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="profile_mode.html">32. Profile Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="sect2"><a href="profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s02.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s04.html">Empirical Cost Model</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch32s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch32s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_allocators.html">33. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ext_containers.html">34. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch34s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">35. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">36. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">37. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">38. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">39. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">40. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">41. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch41s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch41s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A.
Contributing
</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="documentation_style.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="documentation_style.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="documentation_style.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B.
@@ -51,7 +51,7 @@
</a></span></dt><dt><span class="appendix"><a href="appendix_gpl.html">D.
GNU General Public License version 3
- </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt><dt><span class="index"><a href="bk01ix01.html">Index</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="status.html#id446021">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id433682">C++ TR1 Implementation Status</a></dt><dt>1.3. <a href="status.html#id483878">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="using_headers.html#id450185">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="using_headers.html#id455065">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="using_headers.html#id440168">C++ 200x Library Headers</a></dt><dt>3.4. <a href="using_headers.html#id485458">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="using_headers.html#id437190">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="using_headers.html#id387281">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="using_headers.html#id517054">C++ ABI Headers</a></dt><dt>3.8. <a href="using_headers.html#id439669">Extension Headers</a></dt><dt>3.9. <a href="using_headers.html#id422368">Extension Debug Headers</a></dt><dt>3.10. <a href="using_headers.html#id436860">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id452232">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id387544">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id468908">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id508940">Bitmap Allocator Memory Map</a></dt><dt>A.1. <a href="documentation_style.html#id447935">HTML to Docbook XML markup comparison</a></dt><dt>A.2. <a href="documentation_style.html#id458695">Docbook XML Element Use</a></dt><dt>B.1. <a href="api.html#id539341">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id545205">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. 
+ </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt><dt><span class="index"><a href="bk01ix01.html">Index</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="status.html#id452999">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id458222">C++ TR1 Implementation Status</a></dt><dt>1.3. <a href="status.html#id478373">C++ 200x Implementation Status</a></dt><dt>1.4. <a href="status.html#id410254">C++ TR 24733 Implementation Status</a></dt><dt>3.1. <a href="using_headers.html#id415096">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="using_headers.html#id458725">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="using_headers.html#id457966">C++ 200x Library Headers</a></dt><dt>3.4. <a href="using_headers.html#id407365">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="using_headers.html#id450814">C++ TR 1 Library Headers</a></dt><dt>3.6. <a href="using_headers.html#id480798">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="using_headers.html#id517956">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.8. <a href="using_headers.html#id402018">C++ ABI Headers</a></dt><dt>3.9. <a href="using_headers.html#id400704">Extension Headers</a></dt><dt>3.10. <a href="using_headers.html#id355542">Extension Debug Headers</a></dt><dt>3.11. <a href="using_headers.html#id461107">Extension Profile Headers</a></dt><dt>3.12. <a href="using_headers.html#id497297">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id517820">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id357333">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id479890">Parallel Algorithms</a></dt><dt>32.1. <a href="bk01pt12ch32s02.html#id474437">Code Location</a></dt><dt>32.2. <a href="bk01pt12ch32s07.html#id501361">Diagnostics</a></dt><dt>33.1. <a href="bitmap_allocator.html#id393472">Bitmap Allocator Memory Map</a></dt><dt>A.1. <a href="documentation_style.html#id431910">HTML to Docbook XML markup comparison</a></dt><dt>A.2. <a href="documentation_style.html#id514274">Docbook XML Element Use</a></dt><dt>B.1. <a href="api.html#id505845">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id403516">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. 
Introduction
</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html
index 07c9a1d415e..cbc8ddab532 100644
--- a/libstdc++-v3/doc/html/manual/status.html
+++ b/libstdc++-v3/doc/html/manual/status.html
@@ -3,12 +3,12 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 1. Status</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I.  Introduction" /><link rel="prev" href="intro.html" title="Part I.  Introduction" /><link rel="next" href="license.html" title="License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Status</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><th width="60%" align="center">Part I. 
Introduction
-</th><td width="20%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"></a>Chapter 1. Status</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.iso"></a>Implementation Status</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.1998"></a>C++ 1998/2003</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="iso.1998.status"></a>Implementation Status</h4></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"></a>Chapter 1. Status</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt><dt><span class="sect2"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="sect1"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.iso"></a>Implementation Status</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.1998"></a>C++ 1998/2003</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="iso.1998.status"></a>Implementation Status</h4></div></div></div><p>
This status table is based on the table of contents of ISO/IEC 14882:2003.
</p><p>
This page describes the C++0x support in mainline GCC SVN, not in any
particular release.
-</p><div class="table"><a id="id446021"></a><p class="title"><b>Table 1.1. C++ 1998/2003 Implementation Status</b></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
+</p><div class="table"><a id="id452999"></a><p class="title"><b>Table 1.1. C++ 1998/2003 Implementation Status</b></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
<span class="emphasis"><em>18</em></span>
</td><td colspan="3" align="left">
<span class="emphasis"><em>Language support</em></span>
@@ -90,7 +90,7 @@ particular release.
class. But they are the <span class="emphasis"><em>mangled</em></span> names; you will need to call
<code class="code">c++filt</code> and pass the names as command-line parameters to
demangle them, or call a
- <a class="link" href="ext_demangling.html" title="Chapter 39. Demangling">runtime demangler function</a>.
+ <a class="link" href="ext_demangling.html" title="Chapter 40. Demangling">runtime demangler function</a>.
(The classes in <code class="code">&lt;stdexcept&gt;</code> have constructors which
require an argument to use later for <code class="code">what()</code> calls, so the
problem of <code class="code">what()</code>'s value does not arise in most
@@ -153,7 +153,7 @@ In this implementation the header names are prefixed by
</p><p>
This page describes the TR1 support in mainline GCC SVN, not in any particular
release.
-</p><div class="table"><a id="id433682"></a><p class="title"><b>Table 1.2. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
+</p><div class="table"><a id="id458222"></a><p class="title"><b>Table 1.2. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
<p>
Uses code from
<a class="ulink" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
@@ -171,7 +171,7 @@ presence of the required flag.
</p><p>
This page describes the C++0x support in mainline GCC SVN, not in any
particular release.
-</p><div class="table"><a id="id483878"></a><p class="title"><b>Table 1.3. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
+</p><div class="table"><a id="id478373"></a><p class="title"><b>Table 1.3. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
<span class="emphasis"><em>18</em></span>
</td><td colspan="3" align="left">
<span class="emphasis"><em>Language support</em></span>
@@ -232,7 +232,35 @@ particular release.
<span class="emphasis"><em>Appendix D</em></span>
</td><td colspan="3" align="left">
<span class="emphasis"><em>Compatibility features</em></span>
- </td></tr><tr><td align="left">D.1</td><td align="left">Increment operator with bool operand</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.2</td><td align="left"><code class="code">static</code> keyword</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.3</td><td align="left">Access declarations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.4</td><td align="left">Implicit conversion from const strings</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.5</td><td align="left">C standard library headers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.6</td><td align="left">Old iostreams members</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.7</td><td align="left">char* streams</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.8</td><td align="left">Binders</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.9</td><td align="left"><code class="code">auto_ptr</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.10</td><td align="left">Iterator primitives</td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part I. 
+ </td></tr><tr><td align="left">D.1</td><td align="left">Increment operator with bool operand</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.2</td><td align="left"><code class="code">static</code> keyword</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.3</td><td align="left">Access declarations</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.4</td><td align="left">Implicit conversion from const strings</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.5</td><td align="left">C standard library headers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.6</td><td align="left">Old iostreams members</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.7</td><td align="left">char* streams</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.8</td><td align="left">Binders</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.9</td><td align="left"><code class="code">auto_ptr</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.10</td><td align="left">Iterator primitives</td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr24733"></a>C++ TR 24733</h3></div></div></div><p>
+This table is based on the table of contents of
+ISO/IEC TR 24733 Date: 2009-08-28
+Extension for the programming language C++ to support
+decimal floating-point arithmetic
+</p><p>
+This page describes the TR 24733 support in mainline GCC SVN, not in any
+particular release.
+</p><div class="table"><a id="id410254"></a><p class="title"><b>Table 1.4. C++ TR 24733 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
+ <span class="emphasis"><em>0</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Introduction</em></span>
+ </td></tr><tr><td align="left">
+ <span class="emphasis"><em>1</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Normative references</em></span>
+ </td></tr><tr><td align="left">
+ <span class="emphasis"><em>2</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Conventions</em></span>
+ </td></tr><tr><td align="left">
+ <span class="emphasis"><em>3</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Decimal floating-point types</em></span>
+ </td></tr><tr><td align="left">3.1</td><td align="left">Characteristics of decimal floating-point types</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Decimal Types</td><td align="left"> </td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">3.2.1</td><td align="left">Class <code class="code">decimal</code> synopsis</td><td align="left">Partial</td><td align="left">Missing declarations for formatted input/output; non-conforming extension for functions converting to integral type</td></tr><tr bgcolor="#B0B0B0"><td align="left">3.2.2</td><td align="left">Class <code class="code">decimal32</code></td><td align="left">Partial</td><td align="left">Missing 3.2.2.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</td></tr><tr bgcolor="#B0B0B0"><td align="left">3.2.3</td><td align="left">Class <code class="code">decimal64</code></td><td align="left">Partial</td><td align="left">Missing 3.2.3.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</td></tr><tr bgcolor="#B0B0B0"><td align="left">3.2.4</td><td align="left">Class <code class="code">decimal128</code></td><td align="left">Partial</td><td align="left">Missing 3.2.4.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</td></tr><tr><td align="left">3.2.5</td><td align="left">Initialization from coefficient and exponent</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.2.6</td><td align="left">Conversion to generic floating-point type</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.2.7</td><td align="left">Unary arithmetic operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.2.8</td><td align="left">Binary arithmetic operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.2.9</td><td align="left">Comparison operators</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.2.10</td><td align="left">Formatted input</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.2.11</td><td align="left">Formatted output</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.3</td><td align="left">Additions to header <code class="code">limits</code></td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Headers <code class="code">cfloat</code> and <code class="code">float.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4.2</td><td align="left">Additions to header <code class="code">cfloat</code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#B0B0B0"><td align="left">3.4.3</td><td align="left">Additions to header <code class="code">float.h</code> synopsis</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">3.4.4</td><td align="left">Maximum finite value</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.4.5</td><td align="left">Epsilon</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.4.6</td><td align="left">Minimum positive normal value</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.4.7</td><td align="left">Minimum positive subnormal value</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">3.4.8</td><td align="left">Evaluation format</td><td align="left">Y</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.5</td><td align="left">Additions to <code class="code">cfenv</code> and <code class="code">fenv.h</code></td><td align="left">Outside the scope of GCC</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.6</td><td align="left">Additions to <code class="code">cmath</code> and <code class="code">math.h</code></td><td align="left">Outside the scope of GCC</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.7</td><td align="left">Additions to <code class="code">cstdio</code> and <code class="code">stdio.h</code></td><td align="left">Outside the scope of GCC</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.8</td><td align="left">Additions to <code class="code">cstdlib</code> and <code class="code">stdlib.h</code></td><td align="left">Outside the scope of GCC</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.9</td><td align="left">Additions to <code class="code">cwchar</code> and <code class="code">wchar.h</code></td><td align="left">Outside the scope of GCC</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.10</td><td align="left">Facets</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.11</td><td align="left">Type traits</td><td align="left">N</td><td align="left"> </td></tr><tr bgcolor="#C8B0B0"><td align="left">3.12</td><td align="left">Hash functions</td><td align="left">N</td><td align="left"> </td></tr><tr><td align="left">
+ <span class="emphasis"><em>4</em></span>
+ </td><td colspan="3" align="left">
+ <span class="emphasis"><em>Notes on C compatibility</em></span>
+ </td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part I. 
Introduction
 </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> License</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html
index c2e94a8bfd3..82f3ad7367e 100644
--- a/libstdc++-v3/doc/html/manual/strings.html
+++ b/libstdc++-v3/doc/html/manual/strings.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.strings"></a>Part V. 
Strings
- <a id="id442055" class="indexterm"></a>
+ <a id="id405758" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">shared_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. String Classes</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/support.html b/libstdc++-v3/doc/html/manual/support.html
index a539e63b3bf..48d38aa8df5 100644
--- a/libstdc++-v3/doc/html/manual/support.html
+++ b/libstdc++-v3/doc/html/manual/support.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.support"></a>Part II. 
Support
- <a id="id455542" class="indexterm"></a>
+ <a id="id492773" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="fundamental_types.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="fundamental_types.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="dynamic_memory.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="termination.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="verbose_termination.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html
index 0a502094f7f..b7bf46a67d7 100644
--- a/libstdc++-v3/doc/html/manual/using.html
+++ b/libstdc++-v3/doc/html/manual/using.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I.  Introduction" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="using_headers.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Part I. 
Introduction
-</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
+</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
If you only built a static library (libstdc++.a), or if you
specified static linking, you don't have to worry about this.
But if you built a shared library (libstdc++.so) and linked
diff --git a/libstdc++-v3/doc/html/manual/using_headers.html b/libstdc++-v3/doc/html/manual/using_headers.html
index a7b21388bd2..62bc8f9c665 100644
--- a/libstdc++-v3/doc/html/manual/using_headers.html
+++ b/libstdc++-v3/doc/html/manual/using_headers.html
@@ -20,16 +20,19 @@
upcoming 200x standard.
</p><p>
C++98/03 include files. These are available in the default compilation mode, i.e. <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>.
- </p><div class="table"><a id="id450185"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">iosfwd</code></td></tr><tr><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">numeric</code></td></tr><tr><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td></tr><tr><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">utility</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id455065"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">ciso646</code></td></tr><tr><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td></tr><tr><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstring</code></td></tr><tr><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cwchar</code></td><td align="left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id415096"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">iosfwd</code></td></tr><tr><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">numeric</code></td></tr><tr><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td></tr><tr><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">utility</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id458725"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">ciso646</code></td></tr><tr><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td></tr><tr><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstring</code></td></tr><tr><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cwchar</code></td><td align="left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
C++0x include files. These are only available in C++0x compilation
mode, i.e. <code class="literal">-std=c++0x</code> or <code class="literal">-std=gnu++0x</code>.
-</p><p></p><div class="table"><a id="id440168"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">chrono</code></td><td align="left"><code class="filename">complex</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">forward_list</code></td><td align="left"><code class="filename">fstream</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">initalizer_list</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">iosfwd</code></td></tr><tr><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">mutex</code></td><td align="left"><code class="filename">new</code></td></tr><tr><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">ratio</code></td></tr><tr><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">stdexcept</code></td></tr><tr><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">thread</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">type_traits</code></td><td align="left"><code class="filename">typeinfo</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id485458"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cfenv</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td></tr><tr><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdatomic</code></td></tr><tr><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstdio</code></td></tr><tr><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">ctgmath</code></td><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cuchar</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cwctype</code></td><td align="left"><code class="filename">stdatomic.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><p></p><div class="table"><a id="id457966"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">chrono</code></td><td align="left"><code class="filename">complex</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">forward_list</code></td><td align="left"><code class="filename">fstream</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">future</code></td><td align="left"><code class="filename">initalizer_list</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td></tr><tr><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td></tr><tr><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">mutex</code></td></tr><tr><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">random</code></td></tr><tr><td align="left"><code class="filename">ratio</code></td><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td></tr><tr><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">thread</code></td></tr><tr><td align="left"><code class="filename">tuple</code></td><td align="left"><code class="filename">type_traits</code></td><td align="left"><code class="filename">typeinfo</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="filename">utility</code></td><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id407365"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cfenv</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td></tr><tr><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdatomic</code></td></tr><tr><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstdio</code></td></tr><tr><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">ctgmath</code></td><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cuchar</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cwctype</code></td><td align="left"><code class="filename">stdatomic.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
In addition, TR1 includes as:
-</p><div class="table"><a id="id437190"></a><p class="title"><b>Table 3.5. C++ TR1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/functional</code></td><td align="left"><code class="filename">tr1/random</code></td></tr><tr><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id387281"></a><p class="title"><b>Table 3.6. C++ TR1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/cstdio</code></td></tr><tr><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/ctime</code></td><td align="left"><code class="filename">tr1/cwchar</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="id450814"></a><p class="title"><b>Table 3.5. C++ TR 1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR 1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/functional</code></td><td align="left"><code class="filename">tr1/random</code></td></tr><tr><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id480798"></a><p class="title"><b>Table 3.6. C++ TR 1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR 1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/cstdio</code></td></tr><tr><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/ctime</code></td><td align="left"><code class="filename">tr1/cwchar</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p>Decimal floating-point arithmetic is available if the C++
+compiler supports scalar decimal floating-point types defined via
+<code class="code">__attribute__((mode(SD|DD|LD)))</code>.
+</p><div class="table"><a id="id517956"></a><p class="title"><b>Table 3.7. C++ TR 24733 Decimal Floating-Point Header</b></p><div class="table-contents"><table summary="C++ TR 24733 Decimal Floating-Point Header" border="1"><colgroup><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">decimal/decimal</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
Also included are files for the C++ ABI interface:
-</p><div class="table"><a id="id517054"></a><p class="title"><b>Table 3.7. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="id402018"></a><p class="title"><b>Table 3.8. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
And a large variety of extensions.
-</p><div class="table"><a id="id439669"></a><p class="title"><b>Table 3.8. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/cast.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/slist</code></td></tr><tr><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left"><code class="filename">ext/typelist.h</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id422368"></a><p class="title"><b>Table 3.9. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/set</code></td></tr><tr><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td align="left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id436860"></a><p class="title"><b>Table 3.10. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules.
+</p><div class="table"><a id="id400704"></a><p class="title"><b>Table 3.9. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/cast.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/slist</code></td></tr><tr><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left"><code class="filename">ext/typelist.h</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id355542"></a><p class="title"><b>Table 3.10. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/set</code></td></tr><tr><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td align="left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id461107"></a><p class="title"><b>Table 3.11. Extension Profile Headers</b></p><div class="table-contents"><table summary="Extension Profile Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">profile/bitset</code></td><td align="left"><code class="filename">profile/deque</code></td><td align="left"><code class="filename">profile/list</code></td><td align="left"><code class="filename">profile/map</code></td></tr><tr><td align="left"><code class="filename">profile/set</code></td><td align="left"><code class="filename">profile/unordered_map</code></td><td align="left"><code class="filename">profile/unordered_set</code></td><td align="left"><code class="filename">profile/vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id497297"></a><p class="title"><b>Table 3.12. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules.
</p><p>First, mixing different dialects of the standard headers is not
possible. It's an all-or-nothing affair. Thus, code like
</p><pre class="programlisting">
diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html
index ca5573140d2..3da95195573 100644
--- a/libstdc++-v3/doc/html/manual/utilities.html
+++ b/libstdc++-v3/doc/html/manual/utilities.html
@@ -5,5 +5,5 @@
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.util"></a>Part IV. 
Utilities
- <a id="id440726" class="indexterm"></a>
+ <a id="id457371" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="functors.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="pairs.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="memory.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="memory.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="traits.html">12. Traits</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Cancellation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Functors</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/spine.html b/libstdc++-v3/doc/html/spine.html
index 6df1f0173bc..8fa09254c5c 100644
--- a/libstdc++-v3/doc/html/spine.html
+++ b/libstdc++-v3/doc/html/spine.html
@@ -5,7 +5,7 @@
</p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="book"><a href="manual/spine.html">The GNU C++ Library</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I.
Introduction
-</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="manual/status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="manual/status.html#status.iso.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="manual/license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="manual/bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="manual/make.html">Make</a></span></dt><dt><span class="sect1"><a href="manual/test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="manual/using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="manual/using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/support.html">II.
+</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/status.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="sect2"><a href="manual/status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="manual/status.html#status.iso.200x">C++ 200x</a></span></dt><dt><span class="sect2"><a href="manual/status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/license.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="manual/license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="manual/bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="manual/make.html">Make</a></span></dt><dt><span class="sect1"><a href="manual/test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="manual/using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="manual/using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="manual/using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="manual/using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/support.html">II.
Support
</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="manual/fundamental_types.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/fundamental_types.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/dynamic_memory.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="manual/termination.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="manual/verbose_termination.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/diagnostics.html">III.
@@ -38,7 +38,7 @@
</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/iostream_objects.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="manual/streambufs.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/stringstreams.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/stringstreams.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/fstreams.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/fstreams.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch27s02.html">Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/io_and_c.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/io_and_c.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/extensions.html">XII.
Extensions
-</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="manual/ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="manual/debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="manual/parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_allocators.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/ext_containers.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_utilities.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/ext_algorithms.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/ext_numerics.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/ext_iterators.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/ext_io.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_demangling.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/ext_concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_contributing.html">A.
+</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="manual/ext_compile_checks.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="manual/debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="manual/parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/profile_mode.html">32. Profile Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="sect2"><a href="manual/profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch32s02.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch32s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch32s04.html">Empirical Cost Model</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch32s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch32s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch32s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="manual/profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_allocators.html">33. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="manual/ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/ext_containers.html">34. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch34s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch34s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_utilities.html">35. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/ext_algorithms.html">36. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/ext_numerics.html">37. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/ext_iterators.html">38. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/ext_io.html">39. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_demangling.html">40. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/ext_concurrency.html">41. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch41s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch41s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch41s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch41s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_contributing.html">A.
Contributing
</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="manual/source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="manual/source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/documentation_style.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/documentation_style.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="manual/documentation_style.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/source_design_notes.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/appendix_porting.html">B.
diff --git a/libstdc++-v3/doc/xml/manual/debug.xml b/libstdc++-v3/doc/xml/manual/debug.xml
index 273196ee1a5..ca091268149 100644
--- a/libstdc++-v3/doc/xml/manual/debug.xml
+++ b/libstdc++-v3/doc/xml/manual/debug.xml
@@ -217,6 +217,56 @@
set print demangle on
set demangle-style gnu-v3
</programlisting>
+
+<para>
+ Starting with version 7.0, GDB includes support for writing
+ pretty-printers in Python. Pretty printers for STL classes are
+ distributed with GCC from version 4.5.0. The most recent version of
+ these printers are always found in libstdc++ svn repository.
+ To enable these printers, check-out the latest printers to a local
+ directory:
+</para>
+
+<programlisting>
+ svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
+</programlisting>
+
+<para>
+ Next, add the following section to your ~/.gdbinit The path must
+ match the location where the Python module above was checked-out.
+ So if checked out to: /home/maude/gdb_printers/, the path would be as
+ written in the example below.
+</para>
+
+<programlisting>
+ python
+ import sys
+ sys.path.insert(0, '/home/maude/gdb_printers/python')
+ from libstdcxx.v6.printers import register_libstdcxx_printers
+ register_libstdcxx_printers (None)
+ end
+</programlisting>
+
+<para>
+ The path should be the only element that needs to be adjusted in the
+ example. Once loaded, STL classes that the printers support
+ should print in a more human-readable format. To print the classes
+ in the old style, use the /r (raw) switch in the print command
+ (i.e., print /r foo). This will print the classes as if the Python
+ pretty-printers were not loaded.
+</para>
+
+<para>
+ For additional information on STL support and GDB please visit:
+ <ulink url="http://sourceware.org/gdb/wiki/STLSupport"> "GDB Support
+ for STL" </ulink> in the GDB wiki. Additionally, in-depth
+ documentation and discussion of the pretty printing feature can be
+ found in "Pretty Printing" node in the GDB manual. You can find
+ on-line versions of the GDB user manual in GDB's homepage, at
+ <ulink url="http://sourceware.org/gdb/"> "GDB: The GNU Project
+ Debugger" </ulink>.
+</para>
+
</sect2>
<sect2 id="debug.exceptions">
@@ -243,4 +293,12 @@
</para>
</sect2>
+<sect2 id="debug.profile_mode" xreflabel="debug.profile_mode">
+<title>Profile-based Performance Analysis</title>
+ <para> The <link linkend="manual.ext.profile_mode">Profile-based
+ Performance Analysis</link> Extension has performance checks for many
+ algorithms.
+ </para>
+</sect2>
+
</sect1>
diff --git a/libstdc++-v3/doc/xml/manual/extensions.xml b/libstdc++-v3/doc/xml/manual/extensions.xml
index 82e910023a4..889fe1db014 100644
--- a/libstdc++-v3/doc/xml/manual/extensions.xml
+++ b/libstdc++-v3/doc/xml/manual/extensions.xml
@@ -113,7 +113,13 @@ extensions, be aware of two things:
parse="xml" href="parallel_mode.xml">
</xi:include>
-<!-- Chapter 04 : Allocators -->
+<!-- Chapter 04 : Profile Mode -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="profile_mode.xml">
+</xi:include>
+
+
+<!-- Chapter 05 : Allocators -->
<chapter id="manual.ext.allocator" xreflabel="Allocators">
<?dbhtml filename="ext_allocators.html"?>
<title>Allocators</title>
@@ -130,7 +136,7 @@ extensions, be aware of two things:
</chapter>
-<!-- Chapter 05 : Containers -->
+<!-- Chapter 06 : Containers -->
<chapter id="manual.ext.containers" xreflabel="Containers">
<?dbhtml filename="ext_containers.html"?>
<title>Containers</title>
@@ -266,7 +272,7 @@ extensions, be aware of two things:
</sect1>
</chapter>
-<!-- Chapter 06 : Utilities -->
+<!-- Chapter 07 : Utilities -->
<chapter id="manual.ext.util" xreflabel="Utilities">
<?dbhtml filename="ext_utilities.html"?>
<title>Utilities</title>
@@ -336,7 +342,7 @@ get_temporary_buffer(5, (int*)0);
</chapter>
-<!-- Chapter 07 : Algorithms -->
+<!-- Chapter 08 : Algorithms -->
<chapter id="manual.ext.algorithms" xreflabel="Algorithms">
<?dbhtml filename="ext_algorithms.html"?>
<title>Algorithms</title>
@@ -374,7 +380,7 @@ get_temporary_buffer(5, (int*)0);
</chapter>
-<!-- Chapter 08 : Numerics -->
+<!-- Chapter 09 : Numerics -->
<chapter id="manual.ext.numerics" xreflabel="Numerics">
<?dbhtml filename="ext_numerics.html"?>
<title>Numerics</title>
@@ -399,7 +405,7 @@ get_temporary_buffer(5, (int*)0);
void iota(_ForwardIter first, _ForwardIter last, _Tp value);</programlisting>
</chapter>
-<!-- Chapter 09 : Iterators -->
+<!-- Chapter 10 : Iterators -->
<chapter id="manual.ext.iterators" xreflabel="Iterators">
<?dbhtml filename="ext_iterators.html"?>
<title>Iterators</title>
@@ -423,7 +429,7 @@ get_temporary_buffer(5, (int*)0);
</chapter>
-<!-- Chapter 08 : IO -->
+<!-- Chapter 11 : IO -->
<chapter id="manual.ext.io" xreflabel="IO">
<?dbhtml filename="ext_io.html"?>
<title>Input and Output</title>
@@ -493,7 +499,7 @@ get_temporary_buffer(5, (int*)0);
</sect1>
</chapter>
-<!-- Chapter 09 : Demangling -->
+<!-- Chapter 12 : Demangling -->
<chapter id="manual.ext.demangle" xreflabel="Demangling">
<?dbhtml filename="ext_demangling.html"?>
<title>Demangling</title>
@@ -579,7 +585,7 @@ int main()
</para>
</chapter>
-<!-- Chapter 10 : Concurrency -->
+<!-- Chapter 13 : Concurrency -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="concurrency.xml">
</xi:include>
diff --git a/libstdc++-v3/doc/xml/manual/intro.xml b/libstdc++-v3/doc/xml/manual/intro.xml
index 2fcdeb1b09c..d4e1d12d896 100644
--- a/libstdc++-v3/doc/xml/manual/intro.xml
+++ b/libstdc++-v3/doc/xml/manual/intro.xml
@@ -44,6 +44,11 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="status_cxx200x.xml">
</xi:include>
+
+ <!-- Section 01.4 : Status C++ TR24733 -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="status_cxxtr24733.xml">
+ </xi:include>
</sect1>
<!-- Section 02 : License -->
diff --git a/libstdc++-v3/doc/xml/manual/profile_mode.xml b/libstdc++-v3/doc/xml/manual/profile_mode.xml
new file mode 100644
index 00000000000..5bf8eb13207
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/profile_mode.xml
@@ -0,0 +1,1718 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<chapter id="manual.ext.profile_mode" xreflabel="Profile Mode">
+<?dbhtml filename="profile_mode.html"?>
+
+<chapterinfo>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ <keyword>
+ profile
+ </keyword>
+ </keywordset>
+</chapterinfo>
+
+<title>Profile Mode</title>
+
+
+<sect1 id="manual.ext.profile_mode.intro" xreflabel="Intro">
+ <title>Intro</title>
+ <para>
+ <emphasis>Goal: </emphasis>Give performance improvement advice based on
+ recognition of suboptimal usage patterns of the standard library.
+ </para>
+
+ <para>
+ <emphasis>Method: </emphasis>Wrap the standard library code. Insert
+ calls to an instrumentation library to record the internal state of
+ various components at interesting entry/exit points to/from the standard
+ library. Process trace, recognize suboptimal patterns, give advice.
+ For details, see
+ <ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at
+ CGO 2009</ulink>.
+ </para>
+ <para>
+ <emphasis>Strengths: </emphasis>
+<itemizedlist>
+ <listitem><para>
+ Unintrusive solution. The application code does not require any
+ modification.
+ </para></listitem>
+ <listitem><para> The advice is call context sensitive, thus capable of
+ identifying precisely interesting dynamic performance behavior.
+ </para></listitem>
+ <listitem><para>
+ The overhead model is pay-per-view. When you turn off a diagnostic class
+ at compile time, its overhead disappears.
+ </para></listitem>
+</itemizedlist>
+ </para>
+ <para>
+ <emphasis>Drawbacks: </emphasis>
+<itemizedlist>
+ <listitem><para>
+ You must recompile the application code with custom options.
+ </para></listitem>
+ <listitem><para>You must run the application on representative input.
+ The advice is input dependent.
+ </para></listitem>
+ <listitem><para>
+ The execution time will increase, in some cases by factors.
+ </para></listitem>
+</itemizedlist>
+ </para>
+
+
+<sect2 id="manual.ext.profile_mode.using" xreflabel="Using">
+ <title>Using the Profile Mode</title>
+
+ <para>
+ This is the anticipated common workflow for program <code>foo.cc</code>:
+<programlisting>
+$ cat foo.cc
+#include &lt;vector&gt;
+int main() {
+ vector&lt;int&gt; v;
+ for (int k = 0; k &lt; 1024; ++k) v.insert(v.begin(), k);
+}
+
+$ g++ -D_GLIBCXX_PROFILE foo.cc
+$ ./a.out
+$ cat libstdcxx-profile.txt
+vector-to-list: improvement = 5: call stack = 0x804842c ...
+ : advice = change std::vector to std::list
+vector-size: improvement = 3: call stack = 0x804842c ...
+ : advice = change initial container size from 0 to 1024
+</programlisting>
+ </para>
+
+ <para>
+ Anatomy of a warning:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Warning id. This is a short descriptive string for the class
+ that this warning belongs to. E.g., "vector-to-list".
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Estimated improvement. This is an approximation of the benefit expected
+ from implementing the change suggested by the warning. It is given on
+ a log10 scale. Negative values mean that the alternative would actually
+ do worse than the current choice.
+ In the example above, 5 comes from the fact that the overhead of
+ inserting at the beginning of a vector vs. a list is around 1024 * 1024 / 2,
+ which is around 10e5. The improvement from setting the initial size to
+ 1024 is in the range of 10e3, since the overhead of dynamic resizing is
+ linear in this case.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Call stack. Currently, the addresses are printed without
+ symbol name or code location attribution.
+ Users are expected to postprocess the output using, for instance, addr2line.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The warning message. For some warnings, this is static text, e.g.,
+ "change vector to list". For other warnings, such as the one above,
+ the message contains numeric advice, e.g., the suggested initial size
+ of the hashtable.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>Two files are generated. <code>libstdcxx-profile.txt</code>
+ contains human readable advice. <code>libstdcxx-profile.raw</code>
+ contains implementation specific data about each diagnostic.
+ Their format is not documented. They are sufficient to generate
+ all the advice given in <code>libstdcxx-profile.txt</code>. The advantage
+ of keeping this raw format is that traces from multiple executions can
+ be aggregated simply by concatenating the raw traces. We intend to
+ offer an external utility program that can issue advice from a trace.
+ </para>
+
+ <para>Advice is given regardless whether the transformation is valid.
+ For instance, we advise changing a map to an unordered_map even if the
+ application semantics require that data be ordered.
+ We believe such warnings can help users understand the performance
+ behavior of their application better, which can lead to changes
+ at a higher abstraction level.
+ </para>
+
+</sect2>
+
+<sect2 id="manual.ext.profile_mode.tuning" xreflabel="Tuning">
+ <title>Tuning the Profile Mode</title>
+
+ <para>Compile time switches and environment variables (see also file
+ profiler.h). Unless specified otherwise, they can be set at compile time
+ using -D_&lt;name&gt; or by setting variable &lt;name&gt;
+ in the environment where the program is run, before starting execution.
+ <itemizedlist>
+ <listitem><para>
+ <code>[NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>:
+ enable/disable specific diagnostics.
+ See section Diagnostics for possible values.
+ (Environment variables not supported.)
+ </para></listitem>
+ <listitem><para>
+ <code>GLIBCXX_PROFILE_TRACE_PATH_ROOT</code>: set an alternative root
+ path for the output files.
+ </para></listitem>
+ <listitem><para>GLIBCXX_PROFILE_MAX_WARN_COUNT: set it to the maximum
+ number of warnings desired. The default value is 10.</para></listitem>
+ <listitem><para>
+ <code>GLIBCXX_PROFILE_MAX_STACK_DEPTH</code>: if set to 0,
+ the advice will
+ be collected and reported for the program as a whole, and not for each
+ call context.
+ This could also be used in continuous regression tests, where you
+ just need to know whether there is a regression or not.
+ The default value is 32.
+ </para></listitem>
+ <listitem><para>
+ <code>GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC</code>:
+ set a limit on how much memory to use for the accounting tables for each
+ diagnostic type. When this limit is reached, new events are ignored
+ until the memory usage decreases under the limit. Generally, this means
+ that newly created containers will not be instrumented until some
+ live containers are deleted. The default is 128 MB.
+ </para></listitem>
+ <listitem><para>
+ <code>GLIBCXX_PROFILE_NOTHREADS</code>:
+ Make the library not use threads. Otherwise, pthread mutexes are used
+ to protect access to internal data structures. This should be useful
+ only if the program is single threaded and you want to avoid the overhead
+ of aquiring/releasing locks unnecessarily.
+ (Environment variable not supported.)
+ </para></listitem>
+ <listitem><para>
+ <code>HAVE_EXECINFO_H</code>:
+ This name should be defined at library configuration time.
+ If your library was configured without <code>execinfo.h</code>, but
+ you have it in your include path, you can define it explicitly. Without
+ it, advice is collected for the program as a whole, and not for each
+ call context.
+ (Environment variable not supported.)
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+</sect2>
+
+</sect1>
+
+
+<sect1 id="manual.ext.profile_mode.design" xreflabel="Design">
+ <title>Design</title>
+
+<para>
+</para>
+<table frame='all'>
+<title>Code Location</title>
+<tgroup cols='2' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+
+<thead>
+ <row>
+ <entry>Code Location</entry>
+ <entry>Use</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><code>libstdc++-v3/include/std/*</code></entry>
+ <entry>Preprocessor code to redirect to profile extension headers.</entry>
+ </row>
+ <row>
+ <entry><code>libstdc++-v3/include/profile/*</code></entry>
+ <entry>Profile extension public headers (map, vector, ...).</entry>
+ </row>
+ <row>
+ <entry><code>libstdc++-v3/include/profile/impl/*</code></entry>
+ <entry>Profile extension internals. Implementation files are
+ only included from <code>impl/profiler.h</code>, which is the only
+ file included from the public headers.</entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+<para>
+</para>
+
+<sect2 id="manual.ext.profile_mode.design.wrapper"
+ xreflabel="Wrapper">
+<title>Wrapper Model</title>
+ <para>
+ In order to get our instrumented library version included instead of the
+ release one,
+ we use the same wrapper model as the debug mode.
+ We subclass entities from the release version. Wherever
+ <code>_GLIBCXX_PROFILE</code> is defined, the release namespace is
+ <code>std::__norm</code>, whereas the profile namespace is
+ <code>std::__profile</code>. Using plain <code>std</code> translates
+ into <code>std::__profile</code>.
+ </para>
+ <para>
+ Whenever possible, we try to wrap at the public interface level, e.g.,
+ in <code>unordered_set</code> rather than in <code>hashtable</code>,
+ in order not to depend on implementation.
+ </para>
+ <para>
+ Mixing object files built with and without the profile mode must
+ not affect the program execution. However, there are no guarantees to
+ the accuracy of diagnostics when using even a single object not built with
+ <code>-D_GLIBCXX_PROFILE</code>.
+ Currently, mixing the profile mode with debug and parallel extensions is
+ not allowed. Mixing them at compile time will result in preprocessor errors.
+ Mixing them at link time is undefined.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.instrumentation"
+ xreflabel="Instrumentation">
+<title>Instrumentation</title>
+ <para>
+ Instead of instrumenting every public entry and exit point,
+ we chose to add instrumentation on demand, as needed
+ by individual diagnostics.
+ The main reason is that some diagnostics require us to extract bits of
+ internal state that are particular only to that diagnostic.
+ We plan to formalize this later, after we learn more about the requirements
+ of several diagnostics.
+ </para>
+ <para>
+ All the instrumentation points can be switched on and off using
+ <code>-D[_NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code> options.
+ With all the instrumentation calls off, there should be negligible
+ overhead over the release version. This property is needed to support
+ diagnostics based on timing of internal operations. For such diagnostics,
+ we anticipate turning most of the instrumentation off in order to prevent
+ profiling overhead from polluting time measurements, and thus diagnostics.
+ </para>
+ <para>
+ All the instrumentation on/off compile time switches live in
+ <code>include/profile/profiler.h</code>.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.rtlib"
+ xreflabel="Run Time Behavior">
+<title>Run Time Behavior</title>
+ <para>
+ For practical reasons, the instrumentation library processes the trace
+ partially
+ rather than dumping it to disk in raw form. Each event is processed when
+ it occurs. It is usually attached a cost and it is aggregated into
+ the database of a specific diagnostic class. The cost model
+ is based largely on the standard performance guarantees, but in some
+ cases we use knowledge about GCC's standard library implementation.
+ </para>
+ <para>
+ Information is indexed by (1) call stack and (2) instance id or address
+ to be able to understand and summarize precise creation-use-destruction
+ dynamic chains. Although the analysis is sensitive to dynamic instances,
+ the reports are only sensitive to call context. Whenever a dynamic instance
+ is destroyed, we accumulate its effect to the corresponding entry for the
+ call stack of its constructor location.
+ </para>
+
+ <para>
+ For details, see
+ <ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at
+ CGO 2009</ulink>.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.analysis"
+ xreflabel="Analysis and Diagnostics">
+<title>Analysis and Diagnostics</title>
+ <para>
+ Final analysis takes place offline, and it is based entirely on the
+ generated trace and debugging info in the application binary.
+ See section Diagnostics for a list of analysis types that we plan to support.
+ </para>
+ <para>
+ The input to the analysis is a table indexed by profile type and call stack.
+ The data type for each entry depends on the profile type.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.cost-model"
+ xreflabel="Cost Model">
+<title>Cost Model</title>
+ <para>
+ While it is likely that cost models become complex as we get into
+ more sophisticated analysis, we will try to follow a simple set of rules
+ at the beginning.
+ </para>
+<itemizedlist>
+ <listitem><para><emphasis>Relative benefit estimation:</emphasis>
+ The idea is to estimate or measure the cost of all operations
+ in the original scenario versus the scenario we advise to switch to.
+ For instance, when advising to change a vector to a list, an occurrence
+ of the <code>insert</code> method will generally count as a benefit.
+ Its magnitude depends on (1) the number of elements that get shifted
+ and (2) whether it triggers a reallocation.
+ </para></listitem>
+ <listitem><para><emphasis>Synthetic measurements:</emphasis>
+ We will measure the relative difference between similar operations on
+ different containers. We plan to write a battery of small tests that
+ compare the times of the executions of similar methods on different
+ containers. The idea is to run these tests on the target machine.
+ If this training phase is very quick, we may decide to perform it at
+ library initialization time. The results can be cached on disk and reused
+ across runs.
+ </para></listitem>
+ <listitem><para><emphasis>Timers:</emphasis>
+ We plan to use timers for operations of larger granularity, such as sort.
+ For instance, we can switch between different sort methods on the fly
+ and report the one that performs best for each call context.
+ </para></listitem>
+ <listitem><para><emphasis>Show stoppers:</emphasis>
+ We may decide that the presence of an operation nullifies the advice.
+ For instance, when considering switching from <code>set</code> to
+ <code>unordered_set</code>, if we detect use of operator <code>++</code>,
+ we will simply not issue the advice, since this could signal that the use
+ care require a sorted container.</para></listitem>
+</itemizedlist>
+
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.reports"
+ xreflabel="Reports">
+<title>Reports</title>
+ <para>
+There are two types of reports. First, if we recognize a pattern for which
+we have a substitute that is likely to give better performance, we print
+the advice and estimated performance gain. The advice is usually associated
+to a code position and possibly a call stack.
+ </para>
+ <para>
+Second, we report performance characteristics for which we do not have
+a clear solution for improvement. For instance, we can point to the user
+the top 10 <code>multimap</code> locations
+which have the worst data locality in actual traversals.
+Although this does not offer a solution,
+it helps the user focus on the key problems and ignore the uninteresting ones.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.design.testing"
+ xreflabel="Testing">
+<title>Testing</title>
+ <para>
+ First, we want to make sure we preserve the behavior of the release mode.
+ You can just type <code>"make check-profile"</code>, which
+ builds and runs the whole test suite in profile mode.
+ </para>
+ <para>
+ Second, we want to test the correctness of each diagnostic.
+ We created a <code>profile</code> directory in the test suite.
+ Each diagnostic must come with at least two tests, one for false positives
+ and one for false negatives.
+ </para>
+</sect2>
+
+</sect1>
+
+<sect1 id="manual.ext.profile_mode.api"
+ xreflabel="API">
+<title>Extensions for Custom Containers</title>
+
+ <para>
+ Many large projects use their own data structures instead of the ones in the
+ standard library. If these data structures are similar in functionality
+ to the standard library, they can be instrumented with the same hooks
+ that are used to instrument the standard library.
+ The instrumentation API is exposed in file
+ <code>profiler.h</code> (look for "Instrumentation hooks").
+ </para>
+
+</sect1>
+
+
+<sect1 id="manual.ext.profile_mode.cost_model"
+ xreflabel="Cost Model">
+<title>Empirical Cost Model</title>
+
+ <para>
+ Currently, the cost model uses formulas with predefined relative weights
+ for alternative containers or container implementations. For instance,
+ iterating through a vector is X times faster than iterating through a list.
+ </para>
+ <para>
+ (Under development.)
+ We are working on customizing this to a particular machine by providing
+ an automated way to compute the actual relative weights for operations
+ on the given machine.
+ </para>
+ <para>
+ (Under development.)
+ We plan to provide a performance parameter database format that can be
+ filled in either by hand or by an automated training mechanism.
+ The analysis module will then use this database instead of the built in.
+ generic parameters.
+ </para>
+
+</sect1>
+
+
+<sect1 id="manual.ext.profile_mode.implementation"
+ xreflabel="Implementation">
+<title>Implementation Issues</title>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.stack"
+ xreflabel="Stack Traces">
+<title>Stack Traces</title>
+ <para>
+ Accurate stack traces are needed during profiling since we group events by
+ call context and dynamic instance. Without accurate traces, diagnostics
+ may be hard to interpret. For instance, when giving advice to the user
+ it is imperative to reference application code, not library code.
+ </para>
+ <para>
+ Currently we are using the libc <code>backtrace</code> routine to get
+ stack traces.
+ <code>_GLIBCXX_PROFILE_STACK_DEPTH</code> can be set
+ to 0 if you are willing to give up call context information, or to a small
+ positive value to reduce run time overhead.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.symbols"
+ xreflabel="Symbolization">
+<title>Symbolization of Instruction Addresses</title>
+ <para>
+ The profiling and analysis phases use only instruction addresses.
+ An external utility such as addr2line is needed to postprocess the result.
+ We do not plan to add symbolization support in the profile extension.
+ This would require access to symbol tables, debug information tables,
+ external programs or libraries and other system dependent information.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.concurrency"
+ xreflabel="Concurrency">
+<title>Concurrency</title>
+ <para>
+ Our current model is simplistic, but precise.
+ We cannot afford to approximate because some of our diagnostics require
+ precise matching of operations to container instance and call context.
+ During profiling, we keep a single information table per diagnostic.
+ There is a single lock per information table.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.stdlib-in-proflib"
+ xreflabel="Using the Standard Library in the Runtime Library">
+<title>Using the Standard Library in the Instrumentation Implementation</title>
+ <para>
+ As much as we would like to avoid uses of stdlibc++ within our
+ instrumentation library, containers such as unordered_map are very
+ appealing. We plan to use them as long as they are named properly
+ to avoid ambiguity.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.malloc-hooks"
+ xreflabel="Malloc Hooks">
+<title>Malloc Hooks</title>
+ <para>
+ User applications/libraries can provide malloc hooks.
+ When the implementation of the malloc hooks uses stdlibc++, there can
+ be an infinite cycle between the profile mode instrumentation and the
+ the malloc hook code.
+ </para>
+ <para>
+ We protect against reentrance to the profile mode instrumentation code,
+ which should avoid this problem in most cases.
+ The protection mechanism is thread safe and exception safe.
+ This mechanism does not prevent reentrance to the malloc hook itself,
+ which could still result in deadlock, if, for instance, the malloc hook
+ uses non-recursive locks.
+ XXX: A definitive solution to this problem would be for the profile extension
+ to use a custom allocator internally, and perhaps not to use libstdc++.
+ </para>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.implementation.construction-destruction"
+ xreflabel="Construction and Destruction of Global Objects">
+<title>Construction and Destruction of Global Objects</title>
+ <para>
+ The profiling library state is initialized at the first call to a profiling
+ method. This allows us to record the construction of all global objects.
+ However, we cannot do the same at destruction time. The trace is written
+ by a function registered by <code>atexit</code>, thus invoked by
+ <code>exit</code>.
+ </para>
+</sect2>
+
+</sect1>
+
+
+<sect1 id="manual.ext.profile_mode.developer"
+ xreflabel="Developer Information">
+<title>Developer Information</title>
+
+<sect2 id="manual.ext.profile_mode.developer.bigpic"
+ xreflabel="Big Picture">
+<title>Big Picture</title>
+
+ <para>The profile mode headers are included with
+ <code>-D_GLIBCXX_PROFILE</code> through preprocessor directives in
+ <code>include/std/*</code>.
+ </para>
+
+ <para>Instrumented implementations are provided in
+ <code>include/profile/*</code>. All instrumentation hooks are macros
+ defined in <code>include/profile/profiler.h</code>.
+ </para>
+
+ <para>All the implementation of the instrumentation hooks is in
+ <code>include/profile/impl/*</code>. Although all the code gets included,
+ thus is publicly visible, only a small number of functions are called from
+ outside this directory. All calls to hook implementations must be
+ done through macros defined in <code>profiler.h</code>. The macro
+ must ensure (1) that the call is guarded against reentrance and
+ (2) that the call can be turned off at compile time using a
+ <code>-D_GLIBCXX_PROFILE_...</code> compiler option.
+ </para>
+
+</sect2>
+
+<sect2 id="manual.ext.profile_mode.developer.howto"
+ xreflabel="How To Add A Diagnostic">
+<title>How To Add A Diagnostic</title>
+
+ <para>Let's say the diagnostic name is "magic".
+ </para>
+
+ <para>If you need to instrument a header not already under
+ <code>include/profile/*</code>, first edit the corresponding header
+ under <code>include/std/</code> and add a preprocessor directive such
+ as the one in <code>include/std/vector</code>:
+<programlisting>
+#ifdef _GLIBCXX_PROFILE
+# include &lt;profile/vector&gt;
+#endif
+</programlisting>
+ </para>
+
+ <para>If the file you need to instrument is not yet under
+ <code>include/profile/</code>, make a copy of the one in
+ <code>include/debug</code>, or the main implementation.
+ You'll need to include the main implementation and inherit the classes
+ you want to instrument. Then define the methods you want to instrument,
+ define the instrumentation hooks and add calls to them.
+ Look at <code>include/profile/vector</code> for an example.
+ </para>
+
+ <para>Add macros for the instrumentation hooks in
+ <code>include/profile/impl/profiler.h</code>.
+ Hook names must start with <code>__profcxx_</code>.
+ Make sure they transform
+ in no code with <code>-D_NO_GLBICXX_PROFILE_MAGIC</code>.
+ Make sure all calls to any method in namespace <code>__cxxprof_impl</code>
+ is protected against reentrance using macro
+ <code>_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD</code>.
+ All names of methods in namespace <code>__cxxprof_impl</code> called from
+ <code>profiler.h</code> must start with <code>__trace_magic_</code>.
+ </para>
+
+ <para>Add the implementation of the diagnostic.
+ <itemizedlist>
+ <listitem><para>
+ Create new file <code>include/profile/impl/profiler_magic.h</code>.
+ </para></listitem>
+ <listitem><para>
+ Define class <code>__magic_info: public __object_info_base</code>.
+ This is the representation of a line in the object table.
+ The <code>__merge</code> method is used to aggregate information
+ across all dynamic instances created at the same call context.
+ The <code>__magnitude</code> must return the estimation of the benefit
+ as a number of small operations, e.g., number of words copied.
+ The <code>__write</code> method is used to produce the raw trace.
+ The <code>__advice</code> method is used to produce the advice string.
+ </para></listitem>
+ <listitem><para>
+ Define class <code>__magic_stack_info: public __magic_info</code>.
+ This defines the content of a line in the stack table.
+ </para></listitem>
+ <listitem><para>
+ Define class <code>__trace_magic: public __trace_base&lt;__magic_info,
+ __magic_stack_info&gt;</code>.
+ It defines the content of the trace associated with this diagnostic.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>Add initialization and reporting calls in
+ <code>include/profile/impl/profiler_trace.h</code>. Use
+ <code>__trace_vector_to_list</code> as an example.
+ </para>
+
+ <para>Add documentation in file <code>doc/xml/manual/profile_mode.xml</code>.
+ </para>
+</sect2>
+</sect1>
+
+<sect1 id="manual.ext.profile_mode.diagnostics">
+<title>Diagnostics</title>
+
+ <para>
+ The table below presents all the diagnostics we intend to implement.
+ Each diagnostic has a corresponding compile time switch
+ <code>-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
+ Groups of related diagnostics can be turned on with a single switch.
+ For instance, <code>-D_GLIBCXX_PROFILE_LOCALITY</code> is equivalent to
+ <code>-D_GLIBCXX_PROFILE_SOFTWARE_PREFETCH
+ -D_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
+ </para>
+
+ <para>
+ The benefit, cost, expected frequency and accuracy of each diagnostic
+ was given a grade from 1 to 10, where 10 is highest.
+ A high benefit means that, if the diagnostic is accurate, the expected
+ performance improvement is high.
+ A high cost means that turning this diagnostic on leads to high slowdown.
+ A high frequency means that we expect this to occur relatively often.
+ A high accuracy means that the diagnostic is unlikely to be wrong.
+ These grades are not perfect. They are just meant to guide users with
+ specific needs or time budgets.
+ </para>
+
+<table frame='all'>
+<title>Diagnostics</title>
+<tgroup cols='6' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+<colspec colname='c3'></colspec>
+<colspec colname='c4'></colspec>
+<colspec colname='c5'></colspec>
+<colspec colname='c6'></colspec>
+<colspec colname='c7'></colspec>
+
+<thead>
+ <row>
+ <entry>Group</entry>
+ <entry>Flag</entry>
+ <entry>Benefit</entry>
+ <entry>Cost</entry>
+ <entry>Freq.</entry>
+ <entry>Implemented</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.containers">
+ CONTAINERS</ulink></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.hashtable_too_small">
+ HASHTABLE_TOO_SMALL</ulink></entry>
+ <entry>10</entry>
+ <entry>1</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.hashtable_too_large">
+ HASHTABLE_TOO_LARGE</ulink></entry>
+ <entry>5</entry>
+ <entry>1</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.inefficient_hash">
+ INEFFICIENT_HASH</ulink></entry>
+ <entry>7</entry>
+ <entry>3</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.vector_too_small">
+ VECTOR_TOO_SMALL</ulink></entry>
+ <entry>8</entry>
+ <entry>1</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.vector_too_large">
+ VECTOR_TOO_LARGE</ulink></entry>
+ <entry>5</entry>
+ <entry>1</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.vector_to_hashtable">
+ VECTOR_TO_HASHTABLE</ulink></entry>
+ <entry>7</entry>
+ <entry>7</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.hashtable_to_vector">
+ HASHTABLE_TO_VECTOR</ulink></entry>
+ <entry>7</entry>
+ <entry>7</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.vector_to_list">
+ VECTOR_TO_LIST</ulink></entry>
+ <entry>8</entry>
+ <entry>5</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.list_to_vector">
+ LIST_TO_VECTOR</ulink></entry>
+ <entry>10</entry>
+ <entry>5</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.assoc_ord_to_unord">
+ ORDERED_TO_UNORDERED</ulink></entry>
+ <entry>10</entry>
+ <entry>5</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>only map/unordered_map</entry>
+ </row>
+ <row>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.algorithms">
+ ALGORITHMS</ulink></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.algorithms.sort">
+ SORT</ulink></entry>
+ <entry>7</entry>
+ <entry>8</entry>
+ <entry></entry>
+ <entry>7</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.locality">
+ LOCALITY</ulink></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.locality.sw_prefetch">
+ SOFTWARE_PREFETCH</ulink></entry>
+ <entry>8</entry>
+ <entry>8</entry>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.locality.linked">
+ RBTREE_LOCALITY</ulink></entry>
+ <entry>4</entry>
+ <entry>8</entry>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><ulink url="#manual.ext.profile_mode.analysis.mthread.false_share">
+ FALSE_SHARING</ulink></entry>
+ <entry>8</entry>
+ <entry>10</entry>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>no</entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+<sect2 id="manual.ext.profile_mode.analysis.template"
+ xreflabel="Template">
+<title>Diagnostic Template</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> What problem will it diagnose?
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>.
+ What is the fundamental reason why this is a problem</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>
+ Percentage reduction in execution time. When reduction is more than
+ a constant factor, describe the reduction rate formula.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ What would the advise look like?</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis>
+ What stdlibc++ components need to be instrumented?</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ How do we decide when to issue the advice?</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ How do we measure benefits? Math goes here.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+program code
+...
+advice sample
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.analysis.containers"
+ xreflabel="Containers">
+<title>Containers</title>
+
+<para>
+<emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_CONTAINERS</code>.
+</para>
+
+<sect3 id="manual.ext.profile_mode.analysis.hashtable_too_small"
+ xreflabel="Hashtable Too Small">
+<title>Hashtable Too Small</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect hashtables with many
+ rehash operations, small construction size and large destruction size.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis> Rehash is very expensive.
+ Read content, follow chains within bucket, evaluate hash function, place at
+ new location in different order.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis> 36%.
+ Code similar to example below.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ Set initial size to N at construction site S.
+ </para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis>
+ <code>unordered_set, unordered_map</code> constructor, destructor, rehash.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>unordered_[multi]set|map</code>,
+ record initial size and call context of the constructor.
+ Record size increase, if any, after each relevant operation such as insert.
+ Record the estimated rehash cost.</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Number of individual rehash operations * cost per rehash.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 unordered_set&lt;int&gt; us;
+2 for (int k = 0; k &lt; 1000000; ++k) {
+3 us.insert(k);
+4 }
+
+foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1025530 rehash operations.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+
+<sect3 id="manual.ext.profile_mode.analysis.hashtable_too_large"
+ xreflabel="Hashtable Too Large">
+<title>Hashtable Too Large</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect hashtables which are
+ never filled up because fewer elements than reserved are ever
+ inserted.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis> Save memory, which
+ is good in itself and may also improve memory reference performance through
+ fewer cache and TLB misses.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis> unknown.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ Set initial size to N at construction site S.
+ </para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis>
+ <code>unordered_set, unordered_map</code> constructor, destructor, rehash.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>unordered_[multi]set|map</code>,
+ record initial size and call context of the constructor, and correlate it
+ with its size at destruction time.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Number of iteration operations + memory saved.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;unordered_set&lt;int&gt;&gt; v(100000, unordered_set&lt;int&gt;(100)) ;
+2 for (int k = 0; k &lt; 100000; ++k) {
+3 for (int j = 0; j &lt; 10; ++j) {
+4 v[k].insert(k + j);
+5 }
+6 }
+
+foo.cc:1: advice: Changing initial unordered_set size from 100 to 10 saves N
+bytes of memory and M iteration steps.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.inefficient_hash"
+ xreflabel="Inefficient Hash">
+<title>Inefficient Hash</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_INEFFICIENT_HASH</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect hashtables with polarized
+ distribution.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis> A non-uniform
+ distribution may lead to long chains, thus possibly increasing complexity
+ by a factor up to the number of elements.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis> factor up
+ to container size.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis> Change hash function
+ for container built at site S. Distribution score = N. Access score = S.
+ Longest chain = C, in bucket B.
+ </para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis>
+ <code>unordered_set, unordered_map</code> constructor, destructor, [],
+ insert, iterator.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ Count the exact number of link traversals.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Total number of links traversed.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+class dumb_hash {
+ public:
+ size_t operator() (int i) const { return 0; }
+};
+...
+ unordered_set&lt;int, dumb_hash&gt; hs;
+ ...
+ for (int i = 0; i &lt; COUNT; ++i) {
+ hs.find(i);
+ }
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.vector_too_small"
+ xreflabel="Vector Too Small">
+<title>Vector Too Small</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis>Detect vectors with many
+ resize operations, small construction size and large destruction size..
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>Resizing can be expensive.
+ Copying large amounts of data takes time. Resizing many small vectors may
+ have allocation overhead and affect locality.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ Set initial size to N at construction site S.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>vector</code>,
+ record initial size and call context of the constructor.
+ Record size increase, if any, after each relevant operation such as
+ <code>push_back</code>. Record the estimated resize cost.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Total number of words copied * time to copy a word.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;int&gt; v;
+2 for (int k = 0; k &lt; 1000000; ++k) {
+3 v.push_back(k);
+4 }
+
+foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves
+copying 4000000 bytes and 20 memory allocations and deallocations.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.vector_too_large"
+ xreflabel="Vector Too Large">
+<title>Vector Too Large</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_VECTOR_TOO_LARGE</code>
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis>Detect vectors which are
+ never filled up because fewer elements than reserved are ever
+ inserted.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>Save memory, which
+ is good in itself and may also improve memory reference performance through
+ fewer cache and TLB misses.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ Set initial size to N at construction site S.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>vector</code>,
+ record initial size and call context of the constructor, and correlate it
+ with its size at destruction time.</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Total amount of memory saved.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;vector&lt;int&gt;&gt; v(100000, vector&lt;int&gt;(100)) ;
+2 for (int k = 0; k &lt; 100000; ++k) {
+3 for (int j = 0; j &lt; 10; ++j) {
+4 v[k].insert(k + j);
+5 }
+6 }
+
+foo.cc:1: advice: Changing initial vector size from 100 to 10 saves N
+bytes of memory and may reduce the number of cache and TLB misses.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.vector_to_hashtable"
+ xreflabel="Vector to Hashtable">
+<title>Vector to Hashtable</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect uses of
+ <code>vector</code> that can be substituted with <code>unordered_set</code>
+ to reduce execution time.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Linear search in a vector is very expensive, whereas searching in a hashtable
+ is very quick.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up
+ to container size.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>Replace
+ <code>vector</code> with <code>unordered_set</code> at site S.
+ </para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>
+ operations and access methods.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>vector</code>,
+ record call context of the constructor. Issue the advice only if the
+ only methods called on this <code>vector</code> are <code>push_back</code>,
+ <code>insert</code> and <code>find</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Cost(vector::push_back) + cost(vector::insert) + cost(find, vector) -
+ cost(unordered_set::insert) + cost(unordered_set::find).
+ </para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;int&gt; v;
+...
+2 for (int i = 0; i &lt; 1000; ++i) {
+3 find(v.begin(), v.end(), i);
+4 }
+
+foo.cc:1: advice: Changing "vector" to "unordered_set" will save about 500,000
+comparisons.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.hashtable_to_vector"
+ xreflabel="Hashtable to Vector">
+<title>Hashtable to Vector</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect uses of
+ <code>unordered_set</code> that can be substituted with <code>vector</code>
+ to reduce execution time.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Hashtable iterator is slower than vector iterator.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>95%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>Replace
+ <code>unordered_set</code> with <code>vector</code> at site S.
+ </para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>unordered_set</code>
+ operations and access methods.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>unordered_set</code>,
+ record call context of the constructor. Issue the advice only if the
+ number of <code>find</code>, <code>insert</code> and <code>[]</code>
+ operations on this <code>unordered_set</code> are small relative to the
+ number of elements, and methods <code>begin</code> or <code>end</code>
+ are invoked (suggesting iteration).</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Number of .</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 unordered_set&lt;int&gt; us;
+...
+2 int s = 0;
+3 for (unordered_set&lt;int&gt;::iterator it = us.begin(); it != us.end(); ++it) {
+4 s += *it;
+5 }
+
+foo.cc:1: advice: Changing "unordered_set" to "vector" will save about N
+indirections and may achieve better data locality.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.vector_to_list"
+ xreflabel="Vector to List">
+<title>Vector to List</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect cases where
+ <code>vector</code> could be substituted with <code>list</code> for
+ better performance.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Inserting in the middle of a vector is expensive compared to inserting in a
+ list.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up to
+ container size.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>Replace vector with list
+ at site S.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>
+ operations and access methods.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ For each dynamic instance of <code>vector</code>,
+ record the call context of the constructor. Record the overhead of each
+ <code>insert</code> operation based on current size and insert position.
+ Report instance with high insertion overhead.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ (Sum(cost(vector::method)) - Sum(cost(list::method)), for
+ method in [push_back, insert, erase])
+ + (Cost(iterate vector) - Cost(iterate list))</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;int&gt; v;
+2 for (int i = 0; i &lt; 10000; ++i) {
+3 v.insert(v.begin(), i);
+4 }
+
+foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000
+operations.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.list_to_vector"
+ xreflabel="List to Vector">
+<title>List to Vector</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect cases where
+ <code>list</code> could be substituted with <code>vector</code> for
+ better performance.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Iterating through a vector is faster than through a list.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>64%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>Replace list with vector
+ at site S.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>
+ operations and access methods.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ Issue the advice if there are no <code>insert</code> operations.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ (Sum(cost(vector::method)) - Sum(cost(list::method)), for
+ method in [push_back, insert, erase])
+ + (Cost(iterate vector) - Cost(iterate list))</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 list&lt;int&gt; l;
+...
+2 int sum = 0;
+3 for (list&lt;int&gt;::iterator it = l.begin(); it != l.end(); ++it) {
+4 sum += *it;
+5 }
+
+foo.cc:1: advice: Changing "list" to "vector" will save about 1000000 indirect
+memory references.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.assoc_ord_to_unord"
+ xreflabel="Ordered to Unordered Associative Container">
+<title>Ordered to Unordered Associative Container</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_ORDERED_TO_UNORDERED</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect cases where ordered
+ associative containers can be replaced with unordered ones.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Insert and search are quicker in a hashtable than in
+ a red-black tree.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>52%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ Replace set with unordered_set at site S.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis>
+ <code>set</code>, <code>multiset</code>, <code>map</code>,
+ <code>multimap</code> methods.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ Issue the advice only if we are not using operator <code>++</code> on any
+ iterator on a particular <code>[multi]set|map</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ (Sum(cost(hashtable::method)) - Sum(cost(rbtree::method)), for
+ method in [insert, erase, find])
+ + (Cost(iterate hashtable) - Cost(iterate rbtree))</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 set&lt;int&gt; s;
+2 for (int i = 0; i &lt; 100000; ++i) {
+3 s.insert(i);
+4 }
+5 int sum = 0;
+6 for (int i = 0; i &lt; 100000; ++i) {
+7 sum += *s.find(i);
+8 }
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+</sect2>
+
+
+
+<sect2 id="manual.ext.profile_mode.analysis.algorithms"
+ xreflabel="Algorithms">
+<title>Algorithms</title>
+
+ <para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_ALGORITHMS</code>.
+ </para>
+
+<sect3 id="manual.ext.profile_mode.analysis.algorithms.sort"
+ xreflabel="Sorting">
+<title>Sort Algorithm Performance</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_SORT</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Give measure of sort algorithm
+ performance based on actual input. For instance, advise Radix Sort over
+ Quick Sort for a particular call context.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ See papers:
+ <ulink url="http://portal.acm.org/citation.cfm?doid=1065944.1065981">
+ A framework for adaptive algorithm selection in STAPL</ulink> and
+ <ulink url="http://ieeexplore.ieee.org/search/wrapper.jsp?arnumber=4228227">
+ Optimizing Sorting with Machine Learning Algorithms</ulink>.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>60%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis> Change sort algorithm
+ at site S from X Sort to Y Sort.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis> <code>sort</code>
+ algorithm.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ Issue the advice if the cost model tells us that another sort algorithm
+ would do better on this input. Requires us to know what algorithm we
+ are using in our sort implementation in release mode.</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Runtime(algo) for algo in [radix, quick, merge, ...]</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.analysis.locality"
+ xreflabel="Data Locality">
+<title>Data Locality</title>
+
+ <para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_LOCALITY</code>.
+ </para>
+
+<sect3 id="manual.ext.profile_mode.analysis.locality.sw_prefetch"
+ xreflabel="Need Software Prefetch">
+<title>Need Software Prefetch</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_SOFTWARE_PREFETCH</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Discover sequences of indirect
+ memory accesses that are not regular, thus cannot be predicted by
+ hardware prefetchers.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Indirect references are hard to predict and are very expensive when they
+ miss in caches.</para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>25%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis> Insert prefetch
+ instruction.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis> Vector iterator and
+ access operator [].
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ First, get cache line size and page size from system.
+ Then record iterator dereference sequences for which the value is a pointer.
+ For each sequence within a container, issue a warning if successive pointer
+ addresses are not within cache lines and do not form a linear pattern
+ (otherwise they may be prefetched by hardware).
+ If they also step across page boundaries, make the warning stronger.
+ </para>
+ <para>The same analysis applies to containers other than vector.
+ However, we cannot give the same advice for linked structures, such as list,
+ as there is no random access to the n-th element. The user may still be
+ able to benefit from this information, for instance by employing frays (user
+ level light weight threads) to hide the latency of chasing pointers.
+ </para>
+ <para>
+ This analysis is a little oversimplified. A better cost model could be
+ created by understanding the capability of the hardware prefetcher.
+ This model could be trained automatically by running a set of synthetic
+ cases.
+ </para>
+ </listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Total distance between pointer values of successive elements in vectors
+ of pointers.</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 int zero = 0;
+2 vector&lt;int*&gt; v(10000000, &amp;zero);
+3 for (int k = 0; k &lt; 10000000; ++k) {
+4 v[random() % 10000000] = new int(k);
+5 }
+6 for (int j = 0; j &lt; 10000000; ++j) {
+7 count += (*v[j] == 0 ? 0 : 1);
+8 }
+
+foo.cc:7: advice: Insert prefetch instruction.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.locality.linked"
+ xreflabel="Linked Structure Locality">
+<title>Linked Structure Locality</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Give measure of locality of
+ objects stored in linked structures (lists, red-black trees and hashtables)
+ with respect to their actual traversal patterns.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>Allocation can be tuned
+ to a specific traversal pattern, to result in better data locality.
+ See paper:
+ <ulink url="http://www.springerlink.com/content/8085744l00x72662/">
+ Custom Memory Allocation for Free</ulink>.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>30%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis>
+ High scatter score N for container built at site S.
+ Consider changing allocation sequence or choosing a structure conscious
+ allocator.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis> Methods of all
+ containers using linked structures.</para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ First, get cache line size and page size from system.
+ Then record the number of successive elements that are on different line
+ or page, for each traversal method such as <code>find</code>. Give advice
+ only if the ratio between this number and the number of total node hops
+ is above a threshold.</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Sum(same_cache_line(this,previous))</para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+ 1 set&lt;int&gt; s;
+ 2 for (int i = 0; i &lt; 10000000; ++i) {
+ 3 s.insert(i);
+ 4 }
+ 5 set&lt;int&gt; s1, s2;
+ 6 for (int i = 0; i &lt; 10000000; ++i) {
+ 7 s1.insert(i);
+ 8 s2.insert(i);
+ 9 }
+...
+ // Fast, better locality.
+10 for (set&lt;int&gt;::iterator it = s.begin(); it != s.end(); ++it) {
+11 sum += *it;
+12 }
+ // Slow, elements are further apart.
+13 for (set&lt;int&gt;::iterator it = s1.begin(); it != s1.end(); ++it) {
+14 sum += *it;
+15 }
+
+foo.cc:5: advice: High scatter score NNN for set built here. Consider changing
+the allocation sequence or switching to a structure conscious allocator.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.analysis.mthread"
+ xreflabel="Multithreaded Data Access">
+<title>Multithreaded Data Access</title>
+
+ <para>
+ The diagnostics in this group are not meant to be implemented short term.
+ They require compiler support to know when container elements are written
+ to. Instrumentation can only tell us when elements are referenced.
+ </para>
+
+ <para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_MULTITHREADED</code>.
+ </para>
+
+<sect3 id="manual.ext.profile_mode.analysis.mthread.ddtest"
+ xreflabel="Dependence Violations at Container Level">
+<title>Data Dependence Violations at Container Level</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_DDTEST</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect container elements
+ that are referenced from multiple threads in the parallel region or
+ across parallel regions.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis>
+ Sharing data between threads requires communication and perhaps locking,
+ which may be expensive.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>?%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis> Change data
+ distribution or parallel algorithm.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis> Container access methods
+ and iterators.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ Keep a shadow for each container. Record iterator dereferences and
+ container member accesses. Issue advice for elements referenced by
+ multiple threads.
+ See paper: <ulink url="http://portal.acm.org/citation.cfm?id=207110.207148">
+ The LRPD test: speculative run-time parallelization of loops with
+ privatization and reduction parallelization</ulink>.
+ </para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Number of accesses to elements referenced from multiple threads
+ </para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="manual.ext.profile_mode.analysis.mthread.false_share"
+ xreflabel="False Sharing">
+<title>False Sharing</title>
+<itemizedlist>
+ <listitem><para><emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_FALSE_SHARING</code>.
+ </para></listitem>
+ <listitem><para><emphasis>Goal:</emphasis> Detect elements in the
+ same container which share a cache line, are written by at least one
+ thread, and accessed by different threads.
+ </para></listitem>
+ <listitem><para><emphasis>Fundamentals:</emphasis> Under these assumptions,
+ cache protocols require
+ communication to invalidate lines, which may be expensive.
+ </para></listitem>
+ <listitem><para><emphasis>Sample runtime reduction:</emphasis>68%.
+ </para></listitem>
+ <listitem><para><emphasis>Recommendation:</emphasis> Reorganize container
+ or use padding to avoid false sharing.</para></listitem>
+ <listitem><para><emphasis>To instrument:</emphasis> Container access methods
+ and iterators.
+ </para></listitem>
+ <listitem><para><emphasis>Analysis:</emphasis>
+ First, get the cache line size.
+ For each shared container, record all the associated iterator dereferences
+ and member access methods with the thread id. Compare the address lists
+ across threads to detect references in two different threads to the same
+ cache line. Issue a warning only if the ratio to total references is
+ significant. Do the same for iterator dereference values if they are
+ pointers.</para></listitem>
+ <listitem><para><emphasis>Cost model:</emphasis>
+ Number of accesses to same cache line from different threads.
+ </para></listitem>
+ <listitem><para><emphasis>Example:</emphasis>
+<programlisting>
+1 vector&lt;int&gt; v(2, 0);
+2 #pragma omp parallel for shared(v, SIZE) schedule(static, 1)
+3 for (i = 0; i &lt; SIZE; ++i) {
+4 v[i % 2] += i;
+5 }
+
+OMP_NUM_THREADS=2 ./a.out
+foo.cc:1: advice: Change container structure or padding to avoid false
+sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
+</programlisting>
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+</sect2>
+
+
+<sect2 id="manual.ext.profile_mode.analysis.statistics"
+ xreflabel="Statistics">
+<title>Statistics</title>
+
+<para>
+<emphasis>Switch:</emphasis>
+ <code>_GLIBCXX_PROFILE_STATISTICS</code>.
+</para>
+
+<para>
+ In some cases the cost model may not tell us anything because the costs
+ appear to offset the benefits. Consider the choice between a vector and
+ a list. When there are both inserts and iteration, an automatic advice
+ may not be issued. However, the programmer may still be able to make use
+ of this information in a different way.
+</para>
+<para>
+ This diagnostic will not issue any advice, but it will print statistics for
+ each container construction site. The statistics will contain the cost
+ of each operation actually performed on the container.
+</para>
+
+</sect2>
+
+
+</sect1>
+
+
+<bibliography id="profile_mode.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ Perflint: A Context Sensitive Performance Advisor for C++ Programs
+ </title>
+
+ <author>
+ <firstname>Lixia</firstname>
+ <surname>Liu</surname>
+ </author>
+ <author>
+ <firstname>Silvius</firstname>
+ <surname>Rus</surname>
+ </author>
+
+ <copyright>
+ <year>2009</year>
+ <holder></holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Proceedings of the 2009 International Symposium on Code Generation
+ and Optimization
+ </publishername>
+ </publisher>
+ </biblioentry>
+</bibliography>
+
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml b/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml
new file mode 100644
index 00000000000..08e9a436703
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml
@@ -0,0 +1,299 @@
+<sect2 id="status.iso.tr24733" xreflabel="Status C++ TR24733">
+<?dbhtml filename="status_iso_cxxtr24733.html"?>
+
+<sect2info>
+ <keywordset>
+ <keyword>
+ TR 24733
+ </keyword>
+ </keywordset>
+</sect2info>
+
+<title>C++ TR 24733</title>
+
+<para>
+This table is based on the table of contents of
+ISO/IEC TR 24733 Date: 2009-08-28
+Extension for the programming language C++ to support
+decimal floating-point arithmetic
+</para>
+
+<para>
+This page describes the TR 24733 support in mainline GCC SVN, not in any
+particular release.
+</para>
+
+<!-- Status is Yes or No, Broken/Partial-->
+<!--
+ Yes
+
+ No
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ Broken/Partial
+ <?dbhtml bgcolor="#B0B0B0" ?>
+-->
+<table frame='all'>
+<title>C++ TR 24733 Implementation Status</title>
+<tgroup cols='4' align='left' colsep='0' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+<colspec colname='c3'></colspec>
+<colspec colname='c4'></colspec>
+ <thead>
+ <row>
+ <entry>Section</entry>
+ <entry>Description</entry>
+ <entry>Status</entry>
+ <entry>Comments</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <emphasis>0</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Introduction</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>1</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Normative references</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>2</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Conventions</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>3</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Decimal floating-point types</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry>3.1</entry>
+ <entry>Characteristics of decimal floating-point types</entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2</entry>
+ <entry>Decimal Types</entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>3.2.1</entry>
+ <entry>Class <code>decimal</code> synopsis</entry>
+ <entry>Partial</entry>
+ <entry>Missing declarations for formatted input/output; non-conforming extension for functions converting to integral type</entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>3.2.2</entry>
+ <entry>Class <code>decimal32</code></entry>
+ <entry>Partial</entry>
+ <entry>Missing 3.2.2.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>3.2.3</entry>
+ <entry>Class <code>decimal64</code></entry>
+ <entry>Partial</entry>
+ <entry>Missing 3.2.3.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>3.2.4</entry>
+ <entry>Class <code>decimal128</code></entry>
+ <entry>Partial</entry>
+ <entry>Missing 3.2.4.5 conversion to integral type; conforming extension for conversion from scalar decimal floating-point</entry>
+ </row>
+ <row>
+ <entry>3.2.5</entry>
+ <entry>Initialization from coefficient and exponent</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2.6</entry>
+ <entry>Conversion to generic floating-point type</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2.7</entry>
+ <entry>Unary arithmetic operators</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2.8</entry>
+ <entry>Binary arithmetic operators</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2.9</entry>
+ <entry>Comparison operators</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.2.10</entry>
+ <entry>Formatted input</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.2.11</entry>
+ <entry>Formatted output</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.3</entry>
+ <entry>Additions to header <code>limits</code></entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4</entry>
+ <entry>Headers <code>cfloat</code> and <code>float.h</code></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.2</entry>
+ <entry>Additions to header <code>cfloat</code> synopsis</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#B0B0B0" ?>
+ <entry>3.4.3</entry>
+ <entry>Additions to header <code>float.h</code> synopsis</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.4</entry>
+ <entry>Maximum finite value</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.5</entry>
+ <entry>Epsilon</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.6</entry>
+ <entry>Minimum positive normal value</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.7</entry>
+ <entry>Minimum positive subnormal value</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4.8</entry>
+ <entry>Evaluation format</entry>
+ <entry>Y</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.5</entry>
+ <entry>Additions to <code>cfenv</code> and <code>fenv.h</code></entry>
+ <entry>Outside the scope of GCC</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.6</entry>
+ <entry>Additions to <code>cmath</code> and <code>math.h</code></entry>
+ <entry>Outside the scope of GCC</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.7</entry>
+ <entry>Additions to <code>cstdio</code> and <code>stdio.h</code></entry>
+ <entry>Outside the scope of GCC</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.8</entry>
+ <entry>Additions to <code>cstdlib</code> and <code>stdlib.h</code></entry>
+ <entry>Outside the scope of GCC</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.9</entry>
+ <entry>Additions to <code>cwchar</code> and <code>wchar.h</code></entry>
+ <entry>Outside the scope of GCC</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.10</entry>
+ <entry>Facets</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.11</entry>
+ <entry>Type traits</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <?dbhtml bgcolor="#C8B0B0" ?>
+ <entry>3.12</entry>
+ <entry>Hash functions</entry>
+ <entry>N</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>
+ <emphasis>4</emphasis>
+ </entry>
+ <entry namest="c2" nameend="c4" align="left">
+ <emphasis>Notes on C compatibility</emphasis>
+ </entry>
+ </row>
+
+ </tbody>
+</tgroup>
+</table>
+
+
+</sect2>
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index a32cdb1cd93..bf25bb766ac 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -360,7 +360,7 @@ mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
</para>
<table frame='all'>
-<title>C++ TR1 Library Headers</title>
+<title>C++ TR 1 Library Headers</title>
<tgroup cols='5' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'></colspec>
<colspec colname='c2'></colspec>
@@ -395,7 +395,7 @@ mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
<table frame='all'>
-<title>C++ TR1 Library Headers for C Library Facilities</title>
+<title>C++ TR 1 Library Headers for C Library Facilities</title>
<tgroup cols='5' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'></colspec>
<colspec colname='c2'></colspec>
@@ -430,6 +430,24 @@ mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
</tgroup>
</table>
+
+<para>Decimal floating-point arithmetic is available if the C++
+compiler supports scalar decimal floating-point types defined via
+<code>__attribute__((mode(SD|DD|LD)))</code>.
+</para>
+
+<table frame='all'>
+<title>C++ TR 24733 Decimal Floating-Point Header</title>
+<tgroup cols='1' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<tbody>
+<row>
+<entry><filename class="headerfile">decimal/decimal</filename></entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
<para>
Also included are files for the C++ ABI interface:
</para>
@@ -543,6 +561,35 @@ mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
<para></para>
<table frame='all'>
+<title>Extension Profile Headers</title>
+<tgroup cols='4' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+<colspec colname='c3'></colspec>
+<colspec colname='c4'></colspec>
+<tbody>
+
+<row>
+<entry><filename class="headerfile">profile/bitset</filename></entry>
+<entry><filename class="headerfile">profile/deque</filename></entry>
+<entry><filename class="headerfile">profile/list</filename></entry>
+<entry><filename class="headerfile">profile/map</filename></entry>
+</row>
+
+<row>
+<entry><filename class="headerfile">profile/set</filename></entry>
+<entry><filename class="headerfile">profile/unordered_map</filename></entry>
+<entry><filename class="headerfile">profile/unordered_set</filename></entry>
+<entry><filename class="headerfile">profile/vector</filename></entry>
+</row>
+
+</tbody>
+</tgroup>
+</table>
+
+<para></para>
+
+<table frame='all'>
<title>Extension Parallel Headers</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'></colspec>
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 55d02364d11..196ccb9911f 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1,4 +1,4 @@
-## Makefile for the include subdirectory of the GNU C++ Standard library.
+#o# Makefile for the include subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
## Free Software Foundation, Inc.
@@ -618,6 +618,11 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
+decimal_srcdir = ${glibcxx_srcdir}/include/decimal
+decimal_builddir = ./decimal
+decimal_headers = \
+ ${decimal_srcdir}/decimal \
+ ${decimal_srcdir}/decimal.h
# This is the common subset of C++ files that all three "C" header models use.
c_base_srcdir = $(C_INCLUDE_DIR)
@@ -771,6 +776,37 @@ else
parallel_headers =
endif
+# Profile mode headers
+profile_srcdir = ${glibcxx_srcdir}/include/profile
+profile_builddir = ./profile
+profile_headers = \
+ ${profile_srcdir}/base.h \
+ ${profile_srcdir}/unordered_map \
+ ${profile_srcdir}/unordered_set \
+ ${profile_srcdir}/vector \
+ ${profile_srcdir}/bitset \
+ ${profile_srcdir}/deque \
+ ${profile_srcdir}/list \
+ ${profile_srcdir}/map \
+ ${profile_srcdir}/map.h \
+ ${profile_srcdir}/multimap.h \
+ ${profile_srcdir}/multiset.h \
+ ${profile_srcdir}/set \
+ ${profile_srcdir}/set.h \
+ ${profile_srcdir}/hashtable.h
+profile_impl_srcdir = ${glibcxx_srcdir}/include/profile/impl
+profile_impl_builddir = ./profile/impl
+profile_impl_headers = \
+ ${profile_impl_srcdir}/profiler.h \
+ ${profile_impl_srcdir}/profiler_container_size.h \
+ ${profile_impl_srcdir}/profiler_hash_func.h \
+ ${profile_impl_srcdir}/profiler_hashtable_size.h \
+ ${profile_impl_srcdir}/profiler_map_to_unordered_map.h \
+ ${profile_impl_srcdir}/profiler_node.h \
+ ${profile_impl_srcdir}/profiler_state.h \
+ ${profile_impl_srcdir}/profiler_trace.h \
+ ${profile_impl_srcdir}/profiler_vector_size.h \
+ ${profile_impl_srcdir}/profiler_vector_to_list.h
# Some of the different "C" header models need extra files.
# Some "C" header schemes require the "C" compatibility headers.
@@ -865,7 +901,8 @@ endif
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_base_extra \
stamp-c_compatibility stamp-backward stamp-ext stamp-pb \
- stamp-tr1 stamp-tr1-impl stamp-debug stamp-parallel stamp-host
+ stamp-tr1 stamp-tr1-impl stamp-decimal stamp-debug \
+ stamp-parallel stamp-profile stamp-profile-impl stamp-host
# List of all files that are created by explicit building, editing, or
# catenation.
@@ -979,6 +1016,11 @@ stamp-tr1-impl: ${tr1_impl_headers}
@-cd ${tr1_impl_builddir} && $(LN_S) $? . 2>/dev/null
@$(STAMP) stamp-tr1-impl
+stamp-decimal: ${decimal_headers}
+ @-mkdir -p ${decimal_builddir}
+ @-cd ${decimal_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-decimal
+
stamp-debug: ${debug_headers}
@-mkdir -p ${debug_builddir}
@-cd ${debug_builddir} && $(LN_S) $? . 2>/dev/null
@@ -989,6 +1031,16 @@ stamp-parallel: ${parallel_headers}
@-cd ${parallel_builddir} && $(LN_S) $? . 2>/dev/null
@$(STAMP) stamp-parallel
+stamp-profile: ${profile_headers}
+ @-mkdir -p ${profile_builddir}
+ @-cd ${profile_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-profile
+
+stamp-profile-impl: ${profile_impl_headers}
+ @-mkdir -p ${profile_impl_builddir}
+ @-cd ${profile_impl_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-profile-impl
+
stamp-${host_alias}:
@-mkdir -p ${host_builddir}
@$(STAMP) stamp-${host_alias}
@@ -1197,6 +1249,9 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${tr1_impl_builddir}
for file in ${tr1_impl_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${tr1_impl_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${decimal_builddir}
+ for file in ${decimal_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${decimal_builddir}; done
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
for file in ${c_base_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
@@ -1217,6 +1272,12 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir};\
for file in $$parallel_headers_install; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${parallel_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${profile_builddir}
+ for file in ${profile_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${profile_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${profile_impl_builddir}
+ for file in ${profile_impl_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${profile_impl_builddir}; done
$(mkinstalldirs) $(DESTDIR)${host_installdir}
for file in ${host_headers} ${host_headers_extra} \
${thread_host_headers}; do \
@@ -1235,9 +1296,10 @@ clean-local:
# directory. (This is more of an example of how this kind of rule can
# be made.)
.PRECIOUS: $(std_headers) $(c_base_headers) $(tr1_headers) $(tr1_impl_headers)
- $(ext_headers)
+ $(decimal_headers) $(ext_headers)
$(std_headers): ; @:
$(c_base_headers): ; @:
$(tr1_headers): ; @:
$(tr1_impl_headers): ; @:
+$(decimal_headers): ; @:
$(ext_headers): ; @:
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 47995ef7d8f..b1c457e2ea6 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -14,6 +14,8 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
+#o# Makefile for the include subdirectory of the GNU C++ Standard library.
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -856,6 +858,12 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
+decimal_srcdir = ${glibcxx_srcdir}/include/decimal
+decimal_builddir = ./decimal
+decimal_headers = \
+ ${decimal_srcdir}/decimal \
+ ${decimal_srcdir}/decimal.h
+
# This is the common subset of C++ files that all three "C" header models use.
c_base_srcdir = $(C_INCLUDE_DIR)
@@ -1001,6 +1009,40 @@ parallel_builddir = ./parallel
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/unique_copy.h \
@ENABLE_PARALLEL_TRUE@ ${parallel_srcdir}/workstealing.h
+
+# Profile mode headers
+profile_srcdir = ${glibcxx_srcdir}/include/profile
+profile_builddir = ./profile
+profile_headers = \
+ ${profile_srcdir}/base.h \
+ ${profile_srcdir}/unordered_map \
+ ${profile_srcdir}/unordered_set \
+ ${profile_srcdir}/vector \
+ ${profile_srcdir}/bitset \
+ ${profile_srcdir}/deque \
+ ${profile_srcdir}/list \
+ ${profile_srcdir}/map \
+ ${profile_srcdir}/map.h \
+ ${profile_srcdir}/multimap.h \
+ ${profile_srcdir}/multiset.h \
+ ${profile_srcdir}/set \
+ ${profile_srcdir}/set.h \
+ ${profile_srcdir}/hashtable.h
+
+profile_impl_srcdir = ${glibcxx_srcdir}/include/profile/impl
+profile_impl_builddir = ./profile/impl
+profile_impl_headers = \
+ ${profile_impl_srcdir}/profiler.h \
+ ${profile_impl_srcdir}/profiler_container_size.h \
+ ${profile_impl_srcdir}/profiler_hash_func.h \
+ ${profile_impl_srcdir}/profiler_hashtable_size.h \
+ ${profile_impl_srcdir}/profiler_map_to_unordered_map.h \
+ ${profile_impl_srcdir}/profiler_node.h \
+ ${profile_impl_srcdir}/profiler_state.h \
+ ${profile_impl_srcdir}/profiler_trace.h \
+ ${profile_impl_srcdir}/profiler_vector_size.h \
+ ${profile_impl_srcdir}/profiler_vector_to_list.h
+
@GLIBCXX_C_HEADERS_EXTRA_FALSE@c_base_headers_extra =
# Some of the different "C" header models need extra files.
@@ -1083,7 +1125,8 @@ PCHFLAGS = -x c++-header $(CXXFLAGS)
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_base_extra \
stamp-c_compatibility stamp-backward stamp-ext stamp-pb \
- stamp-tr1 stamp-tr1-impl stamp-debug stamp-parallel stamp-host
+ stamp-tr1 stamp-tr1-impl stamp-decimal stamp-debug \
+ stamp-parallel stamp-profile stamp-profile-impl stamp-host
# List of all files that are created by explicit building, editing, or
@@ -1390,6 +1433,11 @@ stamp-tr1-impl: ${tr1_impl_headers}
@-cd ${tr1_impl_builddir} && $(LN_S) $? . 2>/dev/null
@$(STAMP) stamp-tr1-impl
+stamp-decimal: ${decimal_headers}
+ @-mkdir -p ${decimal_builddir}
+ @-cd ${decimal_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-decimal
+
stamp-debug: ${debug_headers}
@-mkdir -p ${debug_builddir}
@-cd ${debug_builddir} && $(LN_S) $? . 2>/dev/null
@@ -1400,6 +1448,16 @@ stamp-parallel: ${parallel_headers}
@-cd ${parallel_builddir} && $(LN_S) $? . 2>/dev/null
@$(STAMP) stamp-parallel
+stamp-profile: ${profile_headers}
+ @-mkdir -p ${profile_builddir}
+ @-cd ${profile_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-profile
+
+stamp-profile-impl: ${profile_impl_headers}
+ @-mkdir -p ${profile_impl_builddir}
+ @-cd ${profile_impl_builddir} && $(LN_S) $? . 2>/dev/null
+ @$(STAMP) stamp-profile-impl
+
stamp-${host_alias}:
@-mkdir -p ${host_builddir}
@$(STAMP) stamp-${host_alias}
@@ -1596,6 +1654,9 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${tr1_impl_builddir}
for file in ${tr1_impl_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${tr1_impl_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${decimal_builddir}
+ for file in ${decimal_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${decimal_builddir}; done
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
for file in ${c_base_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
@@ -1616,6 +1677,12 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir};\
for file in $$parallel_headers_install; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${parallel_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${profile_builddir}
+ for file in ${profile_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${profile_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${profile_impl_builddir}
+ for file in ${profile_impl_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${profile_impl_builddir}; done
$(mkinstalldirs) $(DESTDIR)${host_installdir}
for file in ${host_headers} ${host_headers_extra} \
${thread_host_headers}; do \
@@ -1631,11 +1698,12 @@ clean-local:
# directory. (This is more of an example of how this kind of rule can
# be made.)
.PRECIOUS: $(std_headers) $(c_base_headers) $(tr1_headers) $(tr1_impl_headers)
- $(ext_headers)
+ $(decimal_headers) $(ext_headers)
$(std_headers): ; @:
$(c_base_headers): ; @:
$(tr1_headers): ; @:
$(tr1_impl_headers): ; @:
+$(decimal_headers): ; @:
$(ext_headers): ; @:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libstdc++-v3/include/backward/hash_map b/libstdc++-v3/include/backward/hash_map
index 469429ccc24..cb31687c008 100644
--- a/libstdc++-v3/include/backward/hash_map
+++ b/libstdc++-v3/include/backward/hash_map
@@ -58,7 +58,11 @@
#include "backward_warning.h"
#include <bits/c++config.h>
+#ifdef _GLIBCXX_PROFILE
+#include <profile/hashtable.h>
+#else
#include <backward/hashtable.h>
+#endif
#include <bits/concept_check.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
diff --git a/libstdc++-v3/include/backward/hash_set b/libstdc++-v3/include/backward/hash_set
index 32fa2205eea..d2bd03bb0b3 100644
--- a/libstdc++-v3/include/backward/hash_set
+++ b/libstdc++-v3/include/backward/hash_set
@@ -58,7 +58,11 @@
#include "backward_warning.h"
#include <bits/c++config.h>
+#ifdef _GLIBCXX_PROFILE
+#include <profile/hashtable.h>
+#else
#include <backward/hashtable.h>
+#endif
#include <bits/concept_check.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index d5babc31959..724f373ebae 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -85,11 +85,17 @@
# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
#endif
+// Namespace association for profile
+#ifdef _GLIBCXX_PROFILE
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE 1
+#endif
+
#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
// Defined if any namespace association modes are active.
#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
|| _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE \
|| _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
#endif
@@ -108,6 +114,7 @@
#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
# define _GLIBCXX_STD_D _GLIBCXX_STD
# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD_PR _GLIBCXX_STD
# define _GLIBCXX_STD std
# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
@@ -124,7 +131,7 @@
# endif
// debug
-# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
# define _GLIBCXX_STD_D __norm
# define _GLIBCXX_STD_P _GLIBCXX_STD
# define _GLIBCXX_STD __cxx1998
@@ -134,7 +141,7 @@
# endif
// parallel
-# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
# define _GLIBCXX_STD_D _GLIBCXX_STD
# define _GLIBCXX_STD_P __norm
# define _GLIBCXX_STD __cxx1998
@@ -144,7 +151,7 @@
# endif
// debug + parallel
-# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
# define _GLIBCXX_STD_D __norm
# define _GLIBCXX_STD_P __norm
# define _GLIBCXX_STD __cxx1998
@@ -153,6 +160,21 @@
# define _GLIBCXX_EXTERN_TEMPLATE -1
# endif
+// profile
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL || _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \
+ -D_GLIBCXX_PARALLEL
+# endif
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD_PR __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
# if __NO_INLINE__ && !__GXX_WEAK__
# warning currently using namespace associated mode which may fail \
without inlining due to lack of weak symbols
@@ -163,7 +185,7 @@
#endif
// Namespace associations for debug mode.
-#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
namespace std
{
namespace __norm { }
@@ -182,6 +204,16 @@ namespace std
}
#endif
+// Namespace associations for profile mode
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PROFILE
+namespace std
+{
+ namespace __norm { }
+ inline namespace __profile { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
// Namespace associations for versioning mode.
#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
namespace std
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index a745295e9b0..70cde1a4bf0 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -1862,15 +1862,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
for (; __first != __last; ++__first)
if (__pred(*__first))
{
- *__result1 = *__first;
+ *__result1 = _GLIBCXX_MOVE(*__first);
++__result1;
}
else
{
- *__result2 = *__first;
+ *__result2 = _GLIBCXX_MOVE(*__first);
++__result2;
}
- std::copy(__buffer, __result2, __result1);
+ _GLIBCXX_MOVE3(__buffer, __result2, __result1);
return __result1;
}
else
@@ -2926,15 +2926,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_BidirectionalIterator2 __buffer_end;
if (__len1 > __len2 && __len2 <= __buffer_size)
{
- __buffer_end = std::copy(__middle, __last, __buffer);
- std::copy_backward(__first, __middle, __last);
- return std::copy(__buffer, __buffer_end, __first);
+ __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+ _GLIBCXX_MOVE_BACKWARD3(__first, __middle, __last);
+ return _GLIBCXX_MOVE3(__buffer, __buffer_end, __first);
}
else if (__len1 <= __buffer_size)
{
- __buffer_end = std::copy(__first, __middle, __buffer);
- std::copy(__middle, __last, __first);
- return std::copy_backward(__buffer, __buffer_end, __last);
+ __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+ _GLIBCXX_MOVE3(__middle, __last, __first);
+ return _GLIBCXX_MOVE_BACKWARD3(__buffer, __buffer_end, __last);
}
else
{
@@ -2956,15 +2956,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
- _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
- _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+ _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
__first);
}
else if (__len2 <= __buffer_size)
{
- _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
- std::__merge_backward(__first, __middle, __buffer,
- __buffer_end, __last);
+ _Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+ std::__merge_backward(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+ __last);
}
else
{
@@ -3013,15 +3019,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
- _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
- _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+ _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
__first, __comp);
}
else if (__len2 <= __buffer_size)
{
- _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
- std::__merge_backward(__first, __middle, __buffer, __buffer_end,
- __last, __comp);
+ _Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+ std::__merge_backward(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__middle),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end),
+ __last,__comp);
}
else
{
@@ -3270,16 +3282,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__last - __first >= __two_step)
{
- __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
- __first + __step_size,
- __first + __two_step,
- __result);
+ __result = _GLIBCXX_STD_P::merge(
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __two_step),
+ __result);
__first += __two_step;
}
__step_size = std::min(_Distance(__last - __first), __step_size);
- _GLIBCXX_STD_P::merge(__first, __first + __step_size,
- __first + __step_size, __last,
+ _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+ __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+ __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
__result);
}
@@ -3295,16 +3313,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__last - __first >= __two_step)
{
- __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
- __first + __step_size, __first + __two_step,
- __result,
- __comp);
+ __result = _GLIBCXX_STD_P::merge(
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __two_step),
+ __result, __comp);
__first += __two_step;
}
__step_size = std::min(_Distance(__last - __first), __step_size);
- _GLIBCXX_STD_P::merge(__first, __first + __step_size,
- __first + __step_size, __last, __result, __comp);
+ _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+ __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__first +
+ __step_size),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+ __result, __comp);
}
template<typename _RandomAccessIterator, typename _Distance>
diff --git a/libstdc++-v3/include/decimal/decimal b/libstdc++-v3/include/decimal/decimal
new file mode 100644
index 00000000000..589b7651146
--- /dev/null
+++ b/libstdc++-v3/include/decimal/decimal
@@ -0,0 +1,482 @@
+// <decimal> -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/decimal/decimal
+ * This is a Standard C++ Library header.
+ */
+
+// ISO/IEC TR 24733
+// Written by Janis Johnson <janis187@us.ibm.com>
+
+#ifndef _GLIBCXX_DECIMAL
+#define _GLIBCXX_DECIMAL 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+#ifndef _GLIBCXX_USE_DECIMAL_FLOAT
+#error This file requires compiler and library support for ISO/IEC TR 24733 \
+that is currently not available.
+#endif
+
+namespace std
+{
+ /**
+ * @defgroup decimal Decimal Floating-Point Arithmetic
+ * @ingroup numerics
+ *
+ * Classes and functions for decimal floating-point arithmetic.
+ * @{
+ */
+
+ /** @namespace std::decimal
+ * @brief ISO/IEC TR 24733 Decimal floating-point arithmetic.
+ */
+namespace decimal
+{
+ class decimal32;
+ class decimal64;
+ class decimal128;
+
+ // 3.2.5 Initialization from coefficient and exponent.
+ static decimal32 make_decimal32(long long __coeff, int __exp);
+ static decimal32 make_decimal32(unsigned long long __coeff, int __exp);
+ static decimal64 make_decimal64(long long __coeff, int __exp);
+ static decimal64 make_decimal64(unsigned long long __coeff, int __exp);
+ static decimal128 make_decimal128(long long __coeff, int __exp);
+ static decimal128 make_decimal128(unsigned long long __coeff, int __exp);
+
+ /// Non-conforming extension: Conversion to integral type.
+ long long decimal32_to_long_long(decimal32 __d);
+ long long decimal64_to_long_long(decimal64 __d);
+ long long decimal128_to_long_long(decimal128 __d);
+ long long decimal_to_long_long(decimal32 __d);
+ long long decimal_to_long_long(decimal64 __d);
+ long long decimal_to_long_long(decimal128 __d);
+
+ // 3.2.6 Conversion to generic floating-point type.
+ float decimal32_to_float(decimal32 __d);
+ float decimal64_to_float(decimal64 __d);
+ float decimal128_to_float(decimal128 __d);
+ float decimal_to_float(decimal32 __d);
+ float decimal_to_float(decimal64 __d);
+ float decimal_to_float(decimal128 __d);
+
+ double decimal32_to_double(decimal32 __d);
+ double decimal64_to_double(decimal64 __d);
+ double decimal128_to_double(decimal128 __d);
+ double decimal_to_double(decimal32 __d);
+ double decimal_to_double(decimal64 __d);
+ double decimal_to_double(decimal128 __d);
+
+ long double decimal32_to_long_double(decimal32 __d);
+ long double decimal64_to_long_double(decimal64 __d);
+ long double decimal128_to_long_double(decimal128 __d);
+ long double decimal_to_long_double(decimal32 __d);
+ long double decimal_to_long_double(decimal64 __d);
+ long double decimal_to_long_double(decimal128 __d);
+
+ // 3.2.7 Unary arithmetic operators.
+ decimal32 operator+(decimal32 __rhs);
+ decimal64 operator+(decimal64 __rhs);
+ decimal128 operator+(decimal128 __rhs);
+ decimal32 operator-(decimal32 __rhs);
+ decimal64 operator-(decimal64 __rhs);
+ decimal128 operator-(decimal128 __rhs);
+
+ // 3.2.8 Binary arithmetic operators.
+#define _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(_Op, _T1, _T2, _T3) \
+ _T1 operator _Op(_T2 lhs, _T3 __rhs);
+#define _DECLARE_DECIMAL_BINARY_OP_WITH_INT(_Op, _Tp) \
+ _Tp operator _Op(_Tp lhs, int __rhs); \
+ _Tp operator _Op(_Tp lhs, unsigned int __rhs); \
+ _Tp operator _Op(_Tp lhs, long __rhs); \
+ _Tp operator _Op(_Tp lhs, unsigned long __rhs); \
+ _Tp operator _Op(_Tp lhs, long long __rhs); \
+ _Tp operator _Op(_Tp lhs, unsigned long long __rhs); \
+ _Tp operator _Op(int lhs, _Tp __rhs); \
+ _Tp operator _Op(unsigned int lhs, _Tp __rhs); \
+ _Tp operator _Op(long lhs, _Tp __rhs); \
+ _Tp operator _Op(unsigned long lhs, _Tp __rhs); \
+ _Tp operator _Op(long long lhs, _Tp __rhs); \
+ _Tp operator _Op(unsigned long long lhs, _Tp __rhs);
+
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal32, decimal32, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal32, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal32, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal64, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal128)
+
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal32, decimal32, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal32, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal32, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal64, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal128)
+
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal32, decimal32, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal32, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal32, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal64, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal128)
+
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal32, decimal32, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal32, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal32, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal64, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal32)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal64)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal128)
+ _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal128)
+
+#undef _DECLARE_DECIMAL_BINARY_OP_WITH_DEC
+#undef _DECLARE_DECIMAL_BINARY_OP_WITH_INT
+
+ // 3.2.9 Comparison operators.
+#define _DECLARE_DECIMAL_COMPARISON(_Op, _T) \
+ bool operator _Op(_T lhs, decimal32 _rhs); \
+ bool operator _Op(_T lhs, decimal64 _rhs); \
+ bool operator _Op(_T lhs, decimal128 _rhs); \
+ bool operator _Op(_T lhs, int _rhs); \
+ bool operator _Op(_T lhs, unsigned int _rhs); \
+ bool operator _Op(_T lhs, long _rhs); \
+ bool operator _Op(_T lhs, unsigned long _rhs); \
+ bool operator _Op(_T lhs, long long _rhs); \
+ bool operator _Op(_T lhs, unsigned long long _rhs); \
+ bool operator _Op(int lhs, _T _rhs); \
+ bool operator _Op(unsigned int lhs, _T _rhs); \
+ bool operator _Op(long lhs, _T _rhs); \
+ bool operator _Op(unsigned long lhs, _T _rhs); \
+ bool operator _Op(long long lhs, _T _rhs); \
+ bool operator _Op(unsigned long long lhs, _T _rhs);
+
+ _DECLARE_DECIMAL_COMPARISON(==, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(==, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(==, decimal128)
+
+ _DECLARE_DECIMAL_COMPARISON(!=, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(!=, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(!=, decimal128)
+
+ _DECLARE_DECIMAL_COMPARISON(<, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(<, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(<, decimal128)
+
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal128)
+
+ _DECLARE_DECIMAL_COMPARISON(>, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(>, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(>, decimal128)
+
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal32)
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal64)
+ _DECLARE_DECIMAL_COMPARISON(>=, decimal128)
+
+#undef _DECLARE_DECIMAL_COMPARISON
+
+ /// 3.2.2 Class decimal32.
+ class decimal32
+ {
+ public:
+ typedef float __decfloat32 __attribute__((mode(SD)));
+
+ // 3.2.2.2 Construct/copy/destroy.
+ decimal32() : __val(0.e-101DF) {}
+
+ // 3.2.2.3 Conversion from floating-point type.
+ explicit decimal32(decimal64 __d64);
+ explicit decimal32(decimal128 __d128);
+ explicit decimal32(float __r) : __val(__r) {}
+ explicit decimal32(double __r) : __val(__r) {}
+ explicit decimal32(long double __r) : __val(__r) {}
+
+ // 3.2.2.4 Conversion from integral type.
+ decimal32(int __z) : __val(__z) {}
+ decimal32(unsigned int __z) : __val(__z) {}
+ decimal32(long __z) : __val(__z) {}
+ decimal32(unsigned long __z) : __val(__z) {}
+ decimal32(long long __z) : __val(__z) {}
+ decimal32(unsigned long long __z) : __val(__z) {}
+
+ /// Conforming extension: Conversion from scalar decimal type.
+ decimal32(__decfloat32 __z) : __val(__z) {}
+
+ // 3.2.2.5 Conversion to integral type. (DISABLED)
+ //operator long long() const { return (long long)__val; }
+
+ // 3.2.2.6 Increment and decrement operators.
+ decimal32& operator++()
+ {
+ __val += 1;
+ return *this;
+ }
+
+ decimal32 operator++(int)
+ {
+ decimal32 __tmp = *this;
+ __val += 1;
+ return __tmp;
+ }
+
+ decimal32& operator--()
+ {
+ __val -= 1;
+ return *this;
+ }
+
+ decimal32 operator--(int)
+ {
+ decimal32 __tmp = *this;
+ __val -= 1;
+ return __tmp;
+ }
+
+ // 3.2.2.7 Compound assignment.
+#define _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(_Op) \
+ decimal32& operator _Op(decimal32 __rhs); \
+ decimal32& operator _Op(decimal64 __rhs); \
+ decimal32& operator _Op(decimal128 __rhs); \
+ decimal32& operator _Op(int __rhs); \
+ decimal32& operator _Op(unsigned int __rhs); \
+ decimal32& operator _Op(long __rhs); \
+ decimal32& operator _Op(unsigned long __rhs); \
+ decimal32& operator _Op(long long __rhs); \
+ decimal32& operator _Op(unsigned long long __rhs);
+
+ _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(+=)
+ _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(-=)
+ _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(*=)
+ _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(/=)
+#undef _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT
+
+ private:
+ __decfloat32 __val;
+
+ public:
+ __decfloat32 __getval(void) { return __val; }
+ void __setval(__decfloat32 __x) { __val = __x; }
+ };
+
+ /// 3.2.3 Class decimal64.
+ class decimal64
+ {
+ public:
+ typedef float __decfloat64 __attribute__((mode(DD)));
+
+ // 3.2.3.2 Construct/copy/destroy.
+ decimal64() : __val(0.e-398dd) {}
+
+ // 3.2.3.3 Conversion from floating-point type.
+ decimal64(decimal32 d32);
+ explicit decimal64(decimal128 d128);
+ explicit decimal64(float __r) : __val(__r) {}
+ explicit decimal64(double __r) : __val(__r) {}
+ explicit decimal64(long double __r) : __val(__r) {}
+
+ // 3.2.3.4 Conversion from integral type.
+ decimal64(int __z) : __val(__z) {}
+ decimal64(unsigned int __z) : __val(__z) {}
+ decimal64(long __z) : __val(__z) {}
+ decimal64(unsigned long __z) : __val(__z) {}
+ decimal64(long long __z) : __val(__z) {}
+ decimal64(unsigned long long __z) : __val(__z) {}
+
+ /// Conforming extension: Conversion from scalar decimal type.
+ decimal64(__decfloat64 __z) : __val(__z) {}
+
+ // 3.2.3.5 Conversion to integral type. (DISABLED)
+ //operator long long() const { return (long long)__val; }
+
+ // 3.2.3.6 Increment and decrement operators.
+ decimal64& operator++()
+ {
+ __val += 1;
+ return *this;
+ }
+
+ decimal64 operator++(int)
+ {
+ decimal64 __tmp = *this;
+ __val += 1;
+ return __tmp;
+ }
+
+ decimal64& operator--()
+ {
+ __val -= 1;
+ return *this;
+ }
+
+ decimal64 operator--(int)
+ {
+ decimal64 __tmp = *this;
+ __val -= 1;
+ return __tmp;
+ }
+
+ // 3.2.3.7 Compound assignment.
+#define _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(_Op) \
+ decimal64& operator _Op(decimal32 __rhs); \
+ decimal64& operator _Op(decimal64 __rhs); \
+ decimal64& operator _Op(decimal128 __rhs); \
+ decimal64& operator _Op(int __rhs); \
+ decimal64& operator _Op(unsigned int __rhs); \
+ decimal64& operator _Op(long __rhs); \
+ decimal64& operator _Op(unsigned long __rhs); \
+ decimal64& operator _Op(long long __rhs); \
+ decimal64& operator _Op(unsigned long long __rhs);
+
+ _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(+=)
+ _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(-=)
+ _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(*=)
+ _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(/=)
+#undef _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT
+
+ private:
+ __decfloat64 __val;
+
+ public:
+ __decfloat64 __getval(void) { return __val; }
+ void __setval(__decfloat64 __x) { __val = __x; }
+ };
+
+ /// 3.2.4 Class decimal128.
+ class decimal128
+ {
+ public:
+ typedef float __decfloat128 __attribute__((mode(TD)));
+
+ // 3.2.4.2 Construct/copy/destroy.
+ decimal128() : __val(0.e-6176DL) {}
+
+ // 3.2.4.3 Conversion from floating-point type.
+ decimal128(decimal32 d32);
+ decimal128(decimal64 d64);
+ explicit decimal128(float __r) : __val(__r) {}
+ explicit decimal128(double __r) : __val(__r) {}
+ explicit decimal128(long double __r) : __val(__r) {}
+
+
+ // 3.2.4.4 Conversion from integral type.
+ decimal128(int __z) : __val(__z) {}
+ decimal128(unsigned int __z) : __val(__z) {}
+ decimal128(long __z) : __val(__z) {}
+ decimal128(unsigned long __z) : __val(__z) {}
+ decimal128(long long __z) : __val(__z) {}
+ decimal128(unsigned long long __z) : __val(__z) {}
+
+ /// Conforming extension: Conversion from scalar decimal type.
+ decimal128(__decfloat128 __z) : __val(__z) {}
+
+ // 3.2.4.5 Conversion to integral type. (DISABLED)
+ //operator long long() const { return (long long)__val; }
+
+ // 3.2.4.6 Increment and decrement operators.
+ decimal128& operator++()
+ {
+ __val += 1;
+ return *this;
+ }
+
+ decimal128 operator++(int)
+ {
+ decimal128 __tmp = *this;
+ __val += 1;
+ return __tmp;
+ }
+
+ decimal128& operator--()
+ {
+ __val -= 1;
+ return *this;
+ }
+
+ decimal128 operator--(int)
+ {
+ decimal128 __tmp = *this;
+ __val -= 1;
+ return __tmp;
+ }
+
+ // 3.2.4.7 Compound assignment.
+#define _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(_Op) \
+ decimal128& operator _Op(decimal32 __rhs); \
+ decimal128& operator _Op(decimal64 __rhs); \
+ decimal128& operator _Op(decimal128 __rhs); \
+ decimal128& operator _Op(int __rhs); \
+ decimal128& operator _Op(unsigned int __rhs); \
+ decimal128& operator _Op(long __rhs); \
+ decimal128& operator _Op(unsigned long __rhs); \
+ decimal128& operator _Op(long long __rhs); \
+ decimal128& operator _Op(unsigned long long __rhs);
+
+ _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(+=)
+ _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(-=)
+ _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(*=)
+ _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(/=)
+#undef _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT
+
+ private:
+ __decfloat128 __val;
+
+ public:
+ __decfloat128 __getval(void) { return __val; }
+ void __setval(__decfloat128 __x) { __val = __x; }
+ };
+
+#define _GLIBCXX_USE_DECIMAL_ 1
+
+} // namespace decimal
+ // @} group decimal
+} // namespace std
+
+#include <decimal/decimal.h>
+
+#endif /* _GLIBCXX_DECIMAL */
diff --git a/libstdc++-v3/include/decimal/decimal.h b/libstdc++-v3/include/decimal/decimal.h
new file mode 100644
index 00000000000..002f6ca9b52
--- /dev/null
+++ b/libstdc++-v3/include/decimal/decimal.h
@@ -0,0 +1,519 @@
+// decimal classes -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/decimal.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// ISO/IEC TR 24733
+// Written by Janis Johnson <janis187@us.ibm.com>
+
+#ifndef _GLIBCXX_DECIMAL_IMPL
+#define _GLIBCXX_DECIMAL_IMPL 1
+
+#pragma GCC system_header
+
+namespace std
+{
+namespace decimal
+{
+ // ISO/IEC TR 24733 3.2.[234].1 Construct/copy/destroy.
+
+ inline decimal32::decimal32(decimal64 r) : __val(r.__getval()) {}
+ inline decimal32::decimal32(decimal128 r) : __val(r.__getval()) {}
+ inline decimal64::decimal64(decimal32 r) : __val(r.__getval()) {}
+ inline decimal64::decimal64(decimal128 r) : __val(r.__getval()) {}
+ inline decimal128::decimal128(decimal32 r) : __val(r.__getval()) {}
+ inline decimal128::decimal128(decimal64 r) : __val(r.__getval()) {}
+
+ // ISO/IEC TR 24733 3.2.[234].6 Compound assignment.
+
+#define _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_DEC(_Op1, _Op2, _T1, _T2) \
+ inline _T1& _T1::operator _Op1(_T2 __rhs) \
+ { \
+ __setval(__getval() _Op2 __rhs.__getval()); \
+ return *this; \
+ }
+
+#define _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_Op1, _Op2, _T1, _T2) \
+ inline _T1& _T1::operator _Op1(_T2 __rhs) \
+ { \
+ __setval(__getval() _Op2 __rhs); \
+ return *this; \
+ }
+
+#define _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(_O1, _O2, _T1) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_DEC(_O1,_O2,_T1, decimal32) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_DEC(_O1,_O2,_T1, decimal64) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_DEC(_O1,_O2,_T1, decimal128) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, int) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, unsigned int) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, long) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, unsigned long) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, long long) \
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT(_O1,_O2,_T1, unsigned long long)
+
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(+=, +, decimal32)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(-=, -, decimal32)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(*=, *, decimal32)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(/=, /, decimal32)
+
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(+=, +, decimal64)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(-=, -, decimal64)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(*=, *, decimal64)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(/=, /, decimal64)
+
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(+=, +, decimal128)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(-=, -, decimal128)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(*=, *, decimal128)
+ _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS(/=, /, decimal128)
+
+#undef _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_DEC
+#undef _DEFINE_DECIMAL_COMPOUND_ASSIGNMENT_INT
+#undef _DEFINE_DECIMAL_COMPOUND_ASSIGNMENTS
+
+ // Extension: Conversion to integral type.
+
+ inline long long decimal32_to_long_long(decimal32 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ inline long long decimal64_to_long_long(decimal64 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ inline long long decimal128_to_long_long(decimal128 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ inline long long decimal_to_long_long(decimal32 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ inline long long decimal_to_long_long(decimal64 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ inline long long decimal_to_long_long(decimal128 __d)
+ {
+ return (long long)__d.__getval();
+ }
+
+ // ISO/IEC TR 24733 3.2.5 Initialization from coefficient and exponent.
+
+ static decimal32 make_decimal32(long long __coeff, int __exponent)
+ {
+ decimal32 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DF;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DF;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ static decimal32 make_decimal32(unsigned long long __coeff, int __exponent)
+ {
+ decimal32 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DF;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DF;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ static decimal64 make_decimal64(long long __coeff, int __exponent)
+ {
+ decimal64 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DD;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DD;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ static decimal64 make_decimal64(unsigned long long __coeff, int __exponent)
+ {
+ decimal64 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DD;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DD;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ static decimal128 make_decimal128(long long __coeff, int __exponent)
+ {
+ decimal128 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DL;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DL;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ static decimal128 make_decimal128(unsigned long long __coeff, int __exponent)
+ {
+ decimal128 __decexp = 1, __multiplier;
+
+ if (__exponent < 0)
+ {
+ __multiplier = 1.E-1DL;
+ __exponent = -__exponent;
+ }
+ else
+ __multiplier = 1.E1DL;
+
+ for (int i = 0; i < __exponent; i++)
+ __decexp *= __multiplier;
+
+ return __coeff * __decexp;
+ }
+
+ // ISO/IEC TR 24733 3.2.6 Conversion to generic floating-point type.
+
+ inline float decimal32_to_float(decimal32 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline float decimal64_to_float(decimal64 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline float decimal128_to_float(decimal128 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline float decimal_to_float(decimal32 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline float decimal_to_float(decimal64 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline float decimal_to_float(decimal128 __d)
+ {
+ return (float)__d.__getval();
+ }
+
+ inline double decimal32_to_double(decimal32 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline double decimal64_to_double(decimal64 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline double decimal128_to_double(decimal128 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline double decimal_to_double(decimal32 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline double decimal_to_double(decimal64 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline double decimal_to_double(decimal128 __d)
+ {
+ return (double)__d.__getval();
+ }
+
+ inline long double decimal32_to_long_double(decimal32 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ inline long double decimal64_to_long_double(decimal64 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ inline long double decimal128_to_long_double(decimal128 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ inline long double decimal_to_long_double(decimal32 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ inline long double decimal_to_long_double(decimal64 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ inline long double decimal_to_long_double(decimal128 __d)
+ {
+ return (long double)__d.__getval();
+ }
+
+ // ISO/IEC TR 24733 3.2.7 Unary arithmetic operators.
+
+#define _DEFINE_DECIMAL_UNARY_OP(_Op, _T) \
+ inline _T operator _Op(_T __rhs) \
+ { \
+ _T __tmp; \
+ __tmp.__setval(0 _Op __rhs.__getval()); \
+ return __tmp; \
+ }
+
+ _DEFINE_DECIMAL_UNARY_OP(+, decimal32)
+ _DEFINE_DECIMAL_UNARY_OP(+, decimal64)
+ _DEFINE_DECIMAL_UNARY_OP(+, decimal128)
+ _DEFINE_DECIMAL_UNARY_OP(-, decimal32)
+ _DEFINE_DECIMAL_UNARY_OP(-, decimal64)
+ _DEFINE_DECIMAL_UNARY_OP(-, decimal128)
+
+#undef _DEFINE_DECIMAL_UNARY_OP
+
+ // ISO/IEC TR 24733 3.2.8 Binary arithmetic operators.
+
+#define _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(_Op, _T1, _T2, _T3) \
+ inline _T1 operator _Op(_T2 lhs, _T3 __rhs) \
+ { \
+ _T1 retval; \
+ retval.__setval(lhs.__getval() _Op __rhs.__getval()); \
+ return retval; \
+ }
+
+#define _DEFINE_DECIMAL_BINARY_OP_BOTH(_Op, _T1, _T2, _T3) \
+ inline _T1 operator _Op(_T2 lhs, _T3 __rhs) \
+ { \
+ _T1 retval; \
+ retval.__setval(lhs.__getval() _Op __rhs.__getval()); \
+ return retval; \
+ }
+
+#define _DEFINE_DECIMAL_BINARY_OP_LHS(_Op, _T1, _T2) \
+ inline _T1 operator _Op(_T1 lhs, _T2 __rhs) \
+ { \
+ _T1 retval; \
+ retval.__setval(lhs.__getval() _Op __rhs); \
+ return retval; \
+ }
+
+#define _DEFINE_DECIMAL_BINARY_OP_RHS(_Op, _T1, _T2) \
+ inline _T1 operator _Op(_T2 lhs, _T1 __rhs) \
+ { \
+ _T1 retval; \
+ retval.__setval(lhs _Op __rhs.__getval()); \
+ return retval; \
+ }
+
+#define _DEFINE_DECIMAL_BINARY_OP_WITH_INT(_Op,_Tp) \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, int); \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, unsigned int); \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, long); \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, unsigned long); \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, long long); \
+ _DEFINE_DECIMAL_BINARY_OP_LHS(_Op,_Tp, unsigned long long); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, int); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, unsigned int); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, long); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, unsigned long); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, long long); \
+ _DEFINE_DECIMAL_BINARY_OP_RHS(_Op,_Tp, unsigned long long); \
+
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal32, decimal32, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(+, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal32, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(+, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal32, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal64, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(+, decimal128)
+
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal32, decimal32, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(-, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal32, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(-, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal32, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal64, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(-, decimal128)
+
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal32, decimal32, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(*, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal32, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(*, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal32, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal64, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(*, decimal128)
+
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal32, decimal32, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(/, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal32, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(/, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal32, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal64, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal32)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal64)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal128)
+ _DEFINE_DECIMAL_BINARY_OP_WITH_INT(/, decimal128)
+
+#undef _DEFINE_DECIMAL_BINARY_OP_WITH_DEC
+#undef _DEFINE_DECIMAL_BINARY_OP_BOTH
+#undef _DEFINE_DECIMAL_BINARY_OP_LHS
+#undef _DEFINE_DECIMAL_BINARY_OP_RHS
+#undef _DEFINE_DECIMAL_BINARY_OP_WITH_INT
+
+ // ISO/IEC TR 24733 3.2.9 Comparison operators.
+
+#define _DEFINE_DECIMAL_COMPARISON_BOTH(_Op, _T1, _T2) \
+ inline bool operator _Op(_T1 lhs, _T2 __rhs) \
+ { \
+ return lhs.__getval() _Op __rhs.__getval(); \
+ }
+
+#define _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _T1, _T2) \
+ inline bool operator _Op(_T1 lhs, _T2 __rhs) \
+ { \
+ return lhs.__getval() _Op __rhs; \
+ }
+#define _DEFINE_DECIMAL_COMPARISON_RHS(_Op, _T1, _T2) \
+ inline bool operator _Op(_T1 lhs, _T2 __rhs) \
+ { \
+ return lhs _Op __rhs.__getval(); \
+ }
+
+#define _DEFINE_DECIMAL_COMPARISONS(_Op, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_BOTH(_Op, _Tp, decimal32) \
+ _DEFINE_DECIMAL_COMPARISON_BOTH(_Op, _Tp, decimal64) \
+ _DEFINE_DECIMAL_COMPARISON_BOTH(_Op, _Tp, decimal128) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, int) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, unsigned int) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, long) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, unsigned long) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, long long) \
+ _DEFINE_DECIMAL_COMPARISON_LHS(_Op, _Tp, unsigned long long) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, int, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, unsigned int, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, long, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, unsigned long, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, long long, _Tp) \
+ _DEFINE_DECIMAL_COMPARISON_RHS(_Op, unsigned long long, _Tp)
+
+ _DEFINE_DECIMAL_COMPARISONS(==, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(==, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(==, decimal128)
+ _DEFINE_DECIMAL_COMPARISONS(!=, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(!=, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(!=, decimal128)
+ _DEFINE_DECIMAL_COMPARISONS(<, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(<, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(<, decimal128)
+ _DEFINE_DECIMAL_COMPARISONS(<=, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(<=, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(<=, decimal128)
+ _DEFINE_DECIMAL_COMPARISONS(>, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(>, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(>, decimal128)
+ _DEFINE_DECIMAL_COMPARISONS(>=, decimal32)
+ _DEFINE_DECIMAL_COMPARISONS(>=, decimal64)
+ _DEFINE_DECIMAL_COMPARISONS(>=, decimal128)
+
+#undef _DEFINE_DECIMAL_COMPARISON_BOTH
+#undef _DEFINE_DECIMAL_COMPARISON_LHS
+#undef _DEFINE_DECIMAL_COMPARISON_RHS
+#undef _DEFINE_DECIMAL_COMPARISONS
+
+} // namespace decimal
+} // namespace std
+
+#endif /* _GLIBCXX_DECIMAL_IMPL */
diff --git a/libstdc++-v3/include/ext/bitmap_allocator.h b/libstdc++-v3/include/ext/bitmap_allocator.h
index f6790d00043..d91d9aa5cc6 100644
--- a/libstdc++-v3/include/ext/bitmap_allocator.h
+++ b/libstdc++-v3/include/ext/bitmap_allocator.h
@@ -104,20 +104,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// insert(iterator, const_reference), erase(iterator),
// begin(), end(), back(), operator[].
- __mini_vector() : _M_start(0), _M_finish(0),
- _M_end_of_storage(0)
- { }
-
-#if 0
- ~__mini_vector()
- {
- if (this->_M_start)
- {
- this->deallocate(this->_M_start, this->_M_end_of_storage
- - this->_M_start);
- }
- }
-#endif
+ __mini_vector()
+ : _M_start(0), _M_finish(0), _M_end_of_storage(0) { }
size_type
size() const throw()
@@ -276,15 +264,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return __first;
}
- template<typename _InputIterator, typename _Predicate>
- inline _InputIterator
- __find_if(_InputIterator __first, _InputIterator __last, _Predicate __p)
- {
- while (__first != __last && !__p(*__first))
- ++__first;
- return __first;
- }
-
/** @brief The number of Blocks pointed to by the address pair
* passed to the function.
*/
@@ -380,12 +359,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// is equal to the number of Objects that the current Block can
// store, then there is definitely no space for another single
// object, so just return false.
- _Counter_type __diff =
- __gnu_cxx::__detail::__num_bitmaps(__bp);
+ _Counter_type __diff = __detail::__num_bitmaps(__bp);
if (*(reinterpret_cast<size_t*>
- (__bp.first) - (__diff + 1))
- == __gnu_cxx::__detail::__num_blocks(__bp))
+ (__bp.first) - (__diff + 1)) == __detail::__num_blocks(__bp))
return false;
size_t* __rover = reinterpret_cast<size_t*>(__bp.first) - 1;
@@ -402,7 +379,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
return false;
}
-
size_t*
_M_get() const throw()
@@ -413,7 +389,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ return _M_data_offset * size_t(bits_per_block); }
};
-
/** @class _Bitmap_counter bitmap_allocator.h bitmap_allocator.h
*
* @brief The bitmap counter which acts as the bitmap
@@ -424,11 +399,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
template<typename _Tp>
class _Bitmap_counter
{
- typedef typename __detail::__mini_vector<typename std::pair<_Tp, _Tp> >
- _BPVector;
+ typedef typename
+ __detail::__mini_vector<typename std::pair<_Tp, _Tp> > _BPVector;
typedef typename _BPVector::size_type _Index_type;
typedef _Tp pointer;
-
+
_BPVector& _M_vbp;
size_t* _M_curr_bmap;
size_t* _M_last_bmap_in_block;
@@ -613,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
// Just add the block to the list of free lists unconditionally.
- iterator __temp = __gnu_cxx::__detail::__lower_bound
+ iterator __temp = __detail::__lower_bound
(__free_list.begin(), __free_list.end(),
*__addr, _LT_pointer_compare());
@@ -656,7 +631,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_insert(size_t* __addr) throw()
{
#if defined __GTHREADS
- __gnu_cxx::__scoped_lock __bfl_lock(_M_get_mutex());
+ __scoped_lock __bfl_lock(_M_get_mutex());
#endif
// Call _M_validate to decide what should be done with
// this particular free list.
@@ -747,8 +722,18 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
typedef typename std::pair<_Alloc_block*, _Alloc_block*> _Block_pair;
- typedef typename
- __detail::__mini_vector<_Block_pair> _BPVector;
+ typedef typename __detail::__mini_vector<_Block_pair> _BPVector;
+ typedef typename _BPVector::iterator _BPiter;
+
+ template<typename _Predicate>
+ static _BPiter
+ _S_find(_Predicate __p)
+ {
+ _BPiter __first = _S_mem_blocks.begin();
+ while (__first != _S_mem_blocks.end() && !__p(*__first))
+ ++__first;
+ return __first;
+ }
#if defined _GLIBCXX_DEBUG
// Complexity: O(lg(N)). Where, N is the number of block of size
@@ -756,14 +741,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
_S_check_for_free_blocks() throw()
{
- typedef typename
- __gnu_cxx::__detail::_Ffit_finder<_Alloc_block*> _FFF;
- _FFF __fff;
- typedef typename _BPVector::iterator _BPiter;
- _BPiter __bpi =
- __gnu_cxx::__detail::__find_if
- (_S_mem_blocks.begin(), _S_mem_blocks.end(),
- __gnu_cxx::__detail::_Functor_Ref<_FFF>(__fff));
+ typedef typename __detail::_Ffit_finder<_Alloc_block*> _FFF;
+ _BPiter __bpi = _S_find(_FFF());
_GLIBCXX_DEBUG_ASSERT(__bpi == _S_mem_blocks.end());
}
@@ -793,9 +772,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+ _S_block_size * sizeof(_Alloc_block)
+ __num_bitmaps * sizeof(size_t);
- size_t* __temp =
- reinterpret_cast<size_t*>
- (this->_M_get(__size_to_allocate));
+ size_t* __temp =
+ reinterpret_cast<size_t*>(this->_M_get(__size_to_allocate));
*__temp = 0;
++__temp;
@@ -810,20 +788,15 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Fill the Vector with this information.
_S_mem_blocks.push_back(__bp);
- size_t __bit_mask = 0; // 0 Indicates all Allocated.
- __bit_mask = ~__bit_mask; // 1 Indicates all Free.
-
for (size_t __i = 0; __i < __num_bitmaps; ++__i)
- __temp[__i] = __bit_mask;
+ __temp[__i] = ~static_cast<size_t>(0); // 1 Indicates all Free.
_S_block_size *= 2;
}
-
static _BPVector _S_mem_blocks;
static size_t _S_block_size;
- static __gnu_cxx::__detail::
- _Bitmap_counter<_Alloc_block*> _S_last_request;
+ static __detail::_Bitmap_counter<_Alloc_block*> _S_last_request;
static typename _BPVector::size_type _S_last_dealloc_index;
#if defined __GTHREADS
static __mutex_type _S_mut;
@@ -848,7 +821,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_allocate_single_object() throw(std::bad_alloc)
{
#if defined __GTHREADS
- __gnu_cxx::__scoped_lock __bit_lock(_S_mut);
+ __scoped_lock __bit_lock(_S_mut);
#endif
// The algorithm is something like this: The last_request
@@ -866,21 +839,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// dereference if tinkered with.
while (_S_last_request._M_finished() == false
&& (*(_S_last_request._M_get()) == 0))
- {
- _S_last_request.operator++();
- }
+ _S_last_request.operator++();
if (__builtin_expect(_S_last_request._M_finished() == true, false))
{
// Fall Back to First Fit algorithm.
- typedef typename
- __gnu_cxx::__detail::_Ffit_finder<_Alloc_block*> _FFF;
+ typedef typename __detail::_Ffit_finder<_Alloc_block*> _FFF;
_FFF __fff;
- typedef typename _BPVector::iterator _BPiter;
- _BPiter __bpi =
- __gnu_cxx::__detail::__find_if
- (_S_mem_blocks.begin(), _S_mem_blocks.end(),
- __gnu_cxx::__detail::_Functor_Ref<_FFF>(__fff));
+ _BPiter __bpi = _S_find(__detail::_Functor_Ref<_FFF>(__fff));
if (__bpi != _S_mem_blocks.end())
{
@@ -897,8 +863,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
(__bpi->first + __fff._M_offset() + __nz_bit);
size_t* __puse_count =
reinterpret_cast<size_t*>
- (__bpi->first)
- - (__gnu_cxx::__detail::__num_bitmaps(*__bpi) + 1);
+ (__bpi->first) - (__detail::__num_bitmaps(*__bpi) + 1);
++(*__puse_count);
return __ret;
@@ -927,7 +892,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
size_t* __puse_count = reinterpret_cast<size_t*>
(_S_mem_blocks[_S_last_request._M_where()].first)
- - (__gnu_cxx::__detail::
+ - (__detail::
__num_bitmaps(_S_mem_blocks[_S_last_request._M_where()]) + 1);
++(*__puse_count);
@@ -946,7 +911,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_deallocate_single_object(pointer __p) throw()
{
#if defined __GTHREADS
- __gnu_cxx::__scoped_lock __bit_lock(_S_mut);
+ __scoped_lock __bit_lock(_S_mut);
#endif
_Alloc_block* __real_p = reinterpret_cast<_Alloc_block*>(__p);
@@ -958,9 +923,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_GLIBCXX_DEBUG_ASSERT(_S_last_dealloc_index >= 0);
-
- if (__gnu_cxx::__detail::_Inclusive_between<_Alloc_block*>
- (__real_p) (_S_mem_blocks[_S_last_dealloc_index]))
+ __detail::_Inclusive_between<_Alloc_block*> __ibt(__real_p);
+ if (__ibt(_S_mem_blocks[_S_last_dealloc_index]))
{
_GLIBCXX_DEBUG_ASSERT(_S_last_dealloc_index
<= _S_mem_blocks.size() - 1);
@@ -971,11 +935,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
else
{
- _Iterator _iter = __gnu_cxx::__detail::
- __find_if(_S_mem_blocks.begin(),
- _S_mem_blocks.end(),
- __gnu_cxx::__detail::
- _Inclusive_between<_Alloc_block*>(__real_p));
+ _Iterator _iter = _S_find(__ibt);
_GLIBCXX_DEBUG_ASSERT(_iter != _S_mem_blocks.end());
@@ -995,7 +955,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__detail::__bit_free(__bitmapC, __rotate);
size_t* __puse_count = reinterpret_cast<size_t*>
(_S_mem_blocks[__diff].first)
- - (__gnu_cxx::__detail::__num_bitmaps(_S_mem_blocks[__diff]) + 1);
+ - (__detail::__num_bitmaps(_S_mem_blocks[__diff]) + 1);
_GLIBCXX_DEBUG_ASSERT(*__puse_count != 0);
@@ -1127,12 +1087,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
2 * size_t(__detail::bits_per_block);
template<typename _Tp>
- typename __gnu_cxx::bitmap_allocator<_Tp>::_BPVector::size_type
+ typename bitmap_allocator<_Tp>::_BPVector::size_type
bitmap_allocator<_Tp>::_S_last_dealloc_index = 0;
template<typename _Tp>
- __gnu_cxx::__detail::_Bitmap_counter
- <typename bitmap_allocator<_Tp>::_Alloc_block*>
+ __detail::_Bitmap_counter
+ <typename bitmap_allocator<_Tp>::_Alloc_block*>
bitmap_allocator<_Tp>::_S_last_request(_S_mem_blocks);
#if defined __GTHREADS
diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h
new file mode 100644
index 00000000000..de7bfe9a56f
--- /dev/null
+++ b/libstdc++-v3/include/profile/base.h
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/base.h
+ * @brief Sequential helper functions.
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+// Written by Lixia Liu
+
+#ifndef _GLIBCXX_PROFILE_BASE_H
+#define _GLIBCXX_PROFILE_BASE_H 1
+
+#include <cstdio>
+#include <functional>
+#include <bits/c++config.h>
+#include <profile/impl/profiler.h>
+
+// Profiling mode namespaces.
+
+/**
+ * @namespace std::__profile
+ * @brief GNU profile code, replaces standard behavior with profile behavior.
+ */
+namespace std
+{
+ namespace __profile { }
+}
+
+/**
+ * @namespace __gnu_profile
+ * @brief GNU profile code for public use.
+ */
+namespace __gnu_profile
+{
+ // Import all the profile versions of components in namespace std.
+ using namespace std::__profile;
+}
+
+
+#endif /* _GLIBCXX_PROFILE_BASE_H */
diff --git a/libstdc++-v3/include/profile/bitset b/libstdc++-v3/include/profile/bitset
new file mode 100644
index 00000000000..96a59ea4ad9
--- /dev/null
+++ b/libstdc++-v3/include/profile/bitset
@@ -0,0 +1,345 @@
+// Profiling bitset implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/bitset
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_BITSET
+#define _GLIBCXX_PROFILE_BITSET
+
+#include <bitset>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Bitset wrapper with performance instrumentation. */
+ template<size_t _Nb>
+ class bitset
+ : public _GLIBCXX_STD_D::bitset<_Nb>
+ {
+ typedef _GLIBCXX_STD_D::bitset<_Nb> _Base;
+
+ public:
+ // bit reference:
+ class reference
+ : private _Base::reference
+ {
+ typedef typename _Base::reference _Base_ref;
+
+ friend class bitset;
+ reference();
+
+ reference(const _Base_ref& __base, bitset* __seq)
+ : _Base_ref(__base)
+ { }
+
+ public:
+ reference(const reference& __x)
+ : _Base_ref(__x)
+ { }
+
+ reference&
+ operator=(bool __x)
+ {
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ reference&
+ operator=(const reference& __x)
+ {
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ bool
+ operator~() const
+ {
+ return ~(*static_cast<const _Base_ref*>(this));
+ }
+
+ operator bool() const
+ {
+ return *static_cast<const _Base_ref*>(this);
+ }
+
+ reference&
+ flip()
+ {
+ _Base_ref::flip();
+ return *this;
+ }
+ };
+
+ // 23.3.5.1 constructors:
+ bitset() : _Base() { }
+
+ bitset(unsigned long __val) : _Base(__val) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ explicit
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __str,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __pos = 0,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __n = (std::basic_string<_CharT, _Traits, _Alloc>::npos))
+ : _Base(__str, __pos, __n) { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __str,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __pos,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __n,
+ _CharT __zero, _CharT __one = _CharT('1'))
+ : _Base(__str, __pos, __n, __zero, __one) { }
+
+ bitset(const _Base& __x) : _Base(__x) { }
+
+ // 23.3.5.2 bitset operations:
+ bitset<_Nb>&
+ operator&=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() &= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator|=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() |= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator^=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() ^= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator<<=(size_t __pos)
+ {
+ _M_base() <<= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator>>=(size_t __pos)
+ {
+ _M_base() >>= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ set()
+ {
+ _Base::set();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 186. bitset::set() second parameter should be bool
+ bitset<_Nb>&
+ set(size_t __pos, bool __val = true)
+ {
+ _Base::set(__pos, __val);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset()
+ {
+ _Base::reset();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset(size_t __pos)
+ {
+ _Base::reset(__pos);
+ return *this;
+ }
+
+ bitset<_Nb> operator~() const { return bitset(~_M_base()); }
+
+ bitset<_Nb>&
+ flip()
+ {
+ _Base::flip();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ flip(size_t __pos)
+ {
+ _Base::flip(__pos);
+ return *this;
+ }
+
+ // element access:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ reference
+ operator[](size_t __pos)
+ {
+ return reference(_M_base()[__pos], this);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ bool
+ operator[](size_t __pos) const
+ {
+ return _M_base()[__pos];
+ }
+
+ using _Base::to_ulong;
+
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string() const
+ { return _M_base().template to_string<_CharT, _Traits, _Alloc>(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return _M_base().template
+ to_string<_CharT, _Traits, _Alloc>(__zero, __one);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 434. bitset::to_string() hard to use.
+ template<typename _CharT, typename _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string() const
+ { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 853. to_string needs updating with zero and one.
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ { return to_string<_CharT, _Traits,
+ std::allocator<_CharT> >(__zero, __one); }
+
+ template<typename _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string() const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >();
+ }
+
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >(__zero, __one);
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string() const
+ {
+ return to_string<char,std::char_traits<char>,std::allocator<char> >();
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string(char __zero, char __one = '1') const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >(__zero, __one);
+ }
+
+ using _Base::count;
+ using _Base::size;
+
+ bool
+ operator==(const bitset<_Nb>& __rhs) const
+ { return _M_base() == __rhs; }
+
+ bool
+ operator!=(const bitset<_Nb>& __rhs) const
+ { return _M_base() != __rhs; }
+
+ using _Base::test;
+ using _Base::all;
+ using _Base::any;
+ using _Base::none;
+
+ bitset<_Nb>
+ operator<<(size_t __pos) const
+ { return bitset<_Nb>(_M_base() << __pos); }
+
+ bitset<_Nb>
+ operator>>(size_t __pos) const
+ { return bitset<_Nb>(_M_base() >> __pos); }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) &= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) |= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) ^= __y; }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+ { return __is >> __x._M_base(); }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x)
+ { return __os << __x._M_base(); }
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque
new file mode 100644
index 00000000000..6ba3679e0c6
--- /dev/null
+++ b/libstdc++-v3/include/profile/deque
@@ -0,0 +1,420 @@
+// Profiling deque implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/deque
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_DEQUE
+#define _GLIBCXX_PROFILE_DEQUE 1
+
+#include <deque>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Deque wrapper with performance instrumentation. */
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class deque
+ : public _GLIBCXX_STD_D::deque<_Tp, _Allocator>
+ {
+ typedef _GLIBCXX_STD_D::deque<_Tp, _Allocator> _Base;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef typename _Base::reverse_iterator reverse_iterator;
+ typedef typename _Base::const_reverse_iterator const_reverse_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+
+ // 23.2.1.1 construct/copy/destroy:
+ explicit deque(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit deque(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __a)
+ { }
+
+ deque(const deque& __x)
+ : _Base(__x) { }
+
+ deque(const _Base& __x)
+ : _Base(__x) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque(deque&& __x)
+ : _Base(std::forward<deque>(__x))
+ { }
+
+ deque(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a) { }
+#endif
+
+ ~deque() { }
+
+ deque&
+ operator=(const deque& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque&
+ operator=(deque&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ deque&
+ operator=(initializer_list<value_type> __l)
+ {
+ *static_cast<_Base*>(this) = __l;
+ return *this;
+ }
+#endif
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ _Base::assign(__first, __last);
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ assign(initializer_list<value_type> __l)
+ {
+ _Base::assign(__l);
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin()); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin()); }
+
+ iterator
+ end()
+ { return iterator(_Base::end()); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end()); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // 23.2.1.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ _Base::resize(__sz, __c);
+ }
+
+ using _Base::empty;
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ return _M_base()[__n];
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ return _Base::back();
+ }
+
+ // 23.2.1.3 modifiers:
+ void
+ push_front(const _Tp& __x)
+ {
+ _Base::push_front(__x);
+ }
+
+ void
+ push_back(const _Tp& __x)
+ {
+ _Base::push_back(__x);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_front(_Tp&& __x)
+ { emplace_front(std::move(__x)); }
+
+ void
+ push_back(_Tp&& __x)
+ { emplace_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_front(_Args&&... __args)
+ {
+ _Base::emplace_front(std::forward<_Args>(__args)...);
+ }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args)
+ {
+ _Base::emplace_back(std::forward<_Args>(__args)...);
+ }
+
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ typename _Base::iterator __res = _Base::emplace(__position,
+ std::forward<_Args>(__args)...);
+ return iterator(__res);
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ typename _Base::iterator __res = _Base::insert(__position, __x);
+ return iterator(__res);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ {
+ _Base::insert(__p, __l);
+ }
+#endif
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ _Base::insert(__position, __n, __x);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ _Base::insert(__position, __first, __last);
+ }
+
+ void
+ pop_front()
+ {
+ _Base::pop_front();
+ }
+
+ void
+ pop_back()
+ {
+ _Base::pop_back();
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ if (__position == begin() || __position == end()-1)
+ {
+ return iterator(_Base::erase(__position));
+ }
+ else
+ {
+ typename _Base::iterator __res = _Base::erase(__position);
+ return iterator(__res);
+ }
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ return iterator(_Base::erase(__first, __last));
+ }
+
+ void
+ swap(deque& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/hashtable.h b/libstdc++-v3/include/profile/hashtable.h
new file mode 100644
index 00000000000..20891877121
--- /dev/null
+++ b/libstdc++-v3/include/profile/hashtable.h
@@ -0,0 +1,1151 @@
+// 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 profile/hashtable.h copied from backward/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.
+// Skip instrumentation on vector.
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <bits/stl_function.h>
+#include <backward/hash_fun.h>
+#include <profile/base.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::_GLIBCXX_STD_D::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;
+ __profcxx_hashtable_construct(this, __n_buckets);
+ __profcxx_hashtable_construct2(this);
+ }
+
+ 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;
+ }
+ __profcxx_hashtable_resize(this, __num_elements_hint, __n);
+ }
+ }
+ }
+
+ 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()
+ {
+ size_type __hops=0, __lc = 0, __chain = 0;
+ if (_M_num_elements != 0)
+ __profcxx_hashtable_destruct(this, _M_buckets.size(), _M_num_elements);
+
+ 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;
+
+ // Compute the longest chain count.
+ __chain++;
+ }
+ _M_buckets[__i] = 0;
+
+ // Collect number of hops.
+ if (__chain > 1) {
+ __lc = __lc > __chain ? __lc : __chain;
+ __hops += (__chain-1) * __chain / 2;
+ }
+ __chain = 0;
+ }
+ if (_M_num_elements) {
+ __profcxx_hashtable_destruct2(this, __lc, _M_num_elements, __hops);
+ }
+ _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/profile/impl/profiler.h b/libstdc++-v3/include/profile/impl/profiler.h
new file mode 100644
index 00000000000..f86920344fc
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler.h
@@ -0,0 +1,326 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler.h
+ * @brief Interface of the profiling runtime library.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_H__
+#define PROFCXX_PROFILER_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstddef>
+#else
+#include <stddef.h>
+#endif
+
+/**
+ * @namespace std::__cxxprof_guard
+ * @brief Mechanism to protect all __cxxprof_impl operations against
+ * multithreaded and exception reentrance.
+ */
+namespace __cxxprof_guard
+{
+
+/** @brief Reentrance guard.
+ *
+ * Mechanism to protect all __cxxprof_impl operations against recursion,
+ * multithreaded and exception reentrance.
+ */
+template <int _Unused=0>
+class __reentrance_guard
+{
+ public:
+ static __thread bool __inside_cxxprof_impl;
+ static bool __get_in();
+ __reentrance_guard() {}
+ ~__reentrance_guard() { __inside_cxxprof_impl = false; }
+};
+
+template <int _Unused>
+__thread bool __reentrance_guard<_Unused>::__inside_cxxprof_impl = false;
+
+template <int _Unused>
+bool __reentrance_guard<_Unused>::__get_in()
+{
+ if (__inside_cxxprof_impl) {
+ return false;
+ } else {
+ __inside_cxxprof_impl = true;
+ return true;
+ }
+}
+
+} // namespace __cxxprof_guard
+
+#define _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__x...) \
+ { \
+ if (__cxxprof_guard::__reentrance_guard<0>::__get_in()) \
+ { \
+ __cxxprof_guard::__reentrance_guard<0> __auto_get_out; \
+ __x; \
+ } \
+ }
+
+/**
+ * @namespace std::__cxxprof_impl
+ * @brief Implementation of profile extension.
+ */
+namespace __cxxprof_impl
+{
+// Forward declarations of implementation functions.
+// Don't use any __cxxprof_impl:: in user code.
+// Instead, use the __profcxx... macros, which offer guarded access.
+void __turn_on();
+void __turn_off();
+bool __is_invalid();
+bool __is_on();
+bool __is_off();
+void __report(void);
+void __trace_hashtable_size_resize(const void*, size_t, size_t);
+void __trace_hashtable_size_destruct(const void*, size_t, size_t);
+void __trace_hashtable_size_construct(const void*, size_t);
+void __trace_vector_size_resize(const void*, size_t, size_t);
+void __trace_vector_size_destruct(const void*, size_t, size_t);
+void __trace_vector_size_construct(const void*, size_t);
+void __trace_hash_func_destruct(const void*, size_t, size_t, size_t);
+void __trace_hash_func_construct(const void*);
+void __trace_vector_to_list_destruct(const void*);
+void __trace_vector_to_list_construct(const void*);
+void __trace_vector_to_list_insert(const void*, size_t, size_t);
+void __trace_vector_to_list_iterate(const void*, size_t);
+void __trace_vector_to_list_invalid_operator(const void*);
+void __trace_vector_to_list_resize(const void*, size_t, size_t);
+void __trace_map_to_unordered_map_construct(const void*);
+void __trace_map_to_unordered_map_invalidate(const void*);
+void __trace_map_to_unordered_map_insert(const void*, size_t, size_t);
+void __trace_map_to_unordered_map_erase(const void*, size_t, size_t);
+void __trace_map_to_unordered_map_iterate(const void*, size_t);
+void __trace_map_to_unordered_map_find(const void*, size_t);
+void __trace_map_to_unordered_map_destruct(const void*);
+} // namespace __cxxprof_impl
+
+// Master switch turns on all diagnostics.
+#ifdef _GLIBCXX_PROFILE
+#define _GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL
+#define _GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE
+#define _GLIBCXX_PROFILE_VECTOR_TOO_SMALL
+#define _GLIBCXX_PROFILE_VECTOR_TOO_LARGE
+#define _GLIBCXX_PROFILE_INEFFICIENT_HASH
+#define _GLIBCXX_PROFILE_VECTOR_TO_LIST
+#define _GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP
+#endif
+
+// Expose global management routines to user code.
+#ifdef _GLIBCXX_PROFILE
+#define __profcxx_report() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__report())
+#define __profcxx_turn_on() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__turn_on())
+#define __profcxx_turn_off() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__turn_off())
+#define __profcxx_is_invalid() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__is_invalid())
+#define __profcxx_is_on() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__is_on())
+#define __profcxx__is_off() \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD(__cxxprof_impl::__is_off())
+#else
+#define __profcxx_report()
+#define __profcxx_turn_on()
+#define __profcxx_turn_off()
+#define __profcxx_is_invalid()
+#define __profcxx_is_on()
+#define __profcxx_is_off()
+#endif
+
+// Turn on/off instrumentation for HASHTABLE_TOO_SMALL and HASHTABLE_TOO_LARGE.
+#if ((defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL) \
+ && !defined(_NO_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL)) \
+ || (defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE) \
+ && !defined(_NO_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE)))
+#define __profcxx_hashtable_resize(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_hashtable_size_resize(__x))
+#define __profcxx_hashtable_destruct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_hashtable_size_destruct(__x))
+#define __profcxx_hashtable_construct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_hashtable_size_construct(__x))
+#else
+#define __profcxx_hashtable_resize(__x...)
+#define __profcxx_hashtable_destruct(__x...)
+#define __profcxx_hashtable_construct(__x...)
+#endif
+
+// Turn on/off instrumentation for VECTOR_TOO_SMALL and VECTOR_TOO_LARGE.
+#if ((defined(_GLIBCXX_PROFILE_VECTOR_TOO_SMALL) \
+ && !defined(_NO_GLIBCXX_PROFILE_VECTOR_TOO_SMALL)) \
+ || (defined(_GLIBCXX_PROFILE_VECTOR_TOO_LARGE) \
+ && !defined(_NO_GLIBCXX_PROFILE_VECTOR_TOO_LARGE)))
+#define __profcxx_vector_resize(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_size_resize(__x))
+#define __profcxx_vector_destruct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_size_destruct(__x))
+#define __profcxx_vector_construct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_size_construct(__x))
+#else
+#define __profcxx_vector_resize(__x...)
+#define __profcxx_vector_destruct(__x...)
+#define __profcxx_vector_construct(__x...)
+#endif
+
+// Turn on/off instrumentation for INEFFICIENT_HASH.
+#if (defined(_GLIBCXX_PROFILE_INEFFICIENT_HASH) \
+ && !defined(_NO_GLIBCXX_PROFILE_INEFFICIENT_HASH))
+#define __profcxx_hashtable_construct2(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_hash_func_construct(__x))
+#define __profcxx_hashtable_destruct2(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_hash_func_destruct(__x))
+#else
+#define __profcxx_hashtable_destruct2(__x...)
+#define __profcxx_hashtable_construct2(__x...)
+#endif
+
+// Turn on/off instrumentation for VECTOR_TO_LIST.
+#if (defined(_GLIBCXX_PROFILE_VECTOR_TO_LIST) \
+ && !defined(_NO_GLIBCXX_PROFILE_VECTOR_TO_LIST))
+#define __profcxx_vector_construct2(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_construct(__x))
+#define __profcxx_vector_destruct2(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_destruct(__x))
+#define __profcxx_vector_insert(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_insert(__x))
+#define __profcxx_vector_iterate(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_iterate(__x))
+#define __profcxx_vector_invalid_operator(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_invalid_operator(__x))
+#define __profcxx_vector_resize2(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_vector_to_list_resize(__x))
+#else
+#define __profcxx_vector_destruct2(__x...)
+#define __profcxx_vector_construct2(__x...)
+#define __profcxx_vector_insert(__x...)
+#define __profcxx_vector_iterate(__x...)
+#define __profcxx_vector_invalid_operator(__x...)
+#define __profcxx_vector_resize2(__x...)
+#endif
+
+// Turn on/off instrumentation for MAP_TO_UNORDERED_MAP.
+#if (defined(_GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP) \
+ && !defined(_NO_GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP))
+#define __profcxx_map_to_unordered_map_construct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_construct(__x))
+#define __profcxx_map_to_unordered_map_destruct(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_destruct(__x))
+#define __profcxx_map_to_unordered_map_insert(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_insert(__x))
+#define __profcxx_map_to_unordered_map_erase(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_erase(__x))
+#define __profcxx_map_to_unordered_map_iterate(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_iterate(__x))
+#define __profcxx_map_to_unordered_map_invalidate(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_invalidate(__x))
+#define __profcxx_map_to_unordered_map_find(__x...) \
+ _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
+ __cxxprof_impl::__trace_map_to_unordered_map_find(__x))
+#else
+#define __profcxx_map_to_unordered_map_construct(__x...) \
+
+#define __profcxx_map_to_unordered_map_destruct(__x...)
+#define __profcxx_map_to_unordered_map_insert(__x...)
+#define __profcxx_map_to_unordered_map_erase(__x...)
+#define __profcxx_map_to_unordered_map_iterate(__x...)
+#define __profcxx_map_to_unordered_map_invalidate(__x...)
+#define __profcxx_map_to_unordered_map_find(__x...)
+#endif
+
+// Run multithreaded unless instructed not to do so.
+#ifndef _GLIBCXX_PROFILE_NOTHREADS
+#define _GLIBCXX_PROFILE_THREADS
+#endif
+
+// Set default values for compile-time customizable variables.
+#ifndef _GLIBCXX_PROFILE_TRACE_PATH_ROOT
+#define _GLIBCXX_PROFILE_TRACE_PATH_ROOT "libstdcxx-profile"
+#endif
+#ifndef _GLIBCXX_PROFILE_TRACE_ENV_VAR
+#define _GLIBCXX_PROFILE_TRACE_ENV_VAR "GLIBCXX_PROFILE_TRACE_PATH_ROOT"
+#endif
+#ifndef _GLIBCXX_PROFILE_MAX_WARN_COUNT_ENV_VAR
+#define _GLIBCXX_PROFILE_MAX_WARN_COUNT_ENV_VAR \
+ "GLIBCXX_PROFILE_MAX_WARN_COUNT"
+#endif
+#ifndef _GLIBCXX_PROFILE_MAX_WARN_COUNT
+#define _GLIBCXX_PROFILE_MAX_WARN_COUNT 10
+#endif
+#ifndef _GLIBCXX_PROFILE_MAX_STACK_DEPTH
+#define _GLIBCXX_PROFILE_MAX_STACK_DEPTH 32
+#endif
+#ifndef _GLIBCXX_PROFILE_MAX_STACK_DEPTH_ENV_VAR
+#define _GLIBCXX_PROFILE_MAX_STACK_DEPTH_ENV_VAR \
+ "GLIBCXX_PROFILE_MAX_STACK_DEPTH"
+#endif
+#ifndef _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC
+#define _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC 2 << 27
+#endif
+#ifndef _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC_ENV_VAR
+#define _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC_ENV_VAR \
+ "GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC"
+#endif
+
+// Instrumentation hook implementations.
+#include "profile/impl/profiler_hash_func.h"
+#include "profile/impl/profiler_hashtable_size.h"
+#include "profile/impl/profiler_map_to_unordered_map.h"
+#include "profile/impl/profiler_vector_size.h"
+#include "profile/impl/profiler_vector_to_list.h"
+
+#endif // PROFCXX_PROFILER_H__
diff --git a/libstdc++-v3/include/profile/impl/profiler_container_size.h b/libstdc++-v3/include/profile/impl/profiler_container_size.h
new file mode 100644
index 00000000000..330afc5ba79
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_container_size.h
@@ -0,0 +1,250 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_trace.h
+ * @brief Diagnostics for container sizes.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_CONTAINER_SIZE_H__
+#define PROFCXX_PROFILER_CONTAINER_SIZE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+
+namespace __cxxprof_impl
+{
+
+/** @brief A container size instrumentation line in the object table. */
+class __container_size_info: public __object_info_base
+{
+ public:
+ __container_size_info();
+ __container_size_info(const __container_size_info& __o);
+ __container_size_info(__stack_t __stack, size_t __num);
+ virtual ~__container_size_info() {}
+
+ void __write(FILE* f) const;
+ float __magnitude() const { return static_cast<float>(_M_cost); }
+ const char* __advice() const;
+
+ void __merge(const __container_size_info& __o);
+ // Call if a container is destructed or cleaned.
+ void __destruct(size_t __num, size_t __inum);
+ // Estimate the cost of resize/rehash.
+ float __resize_cost(size_t __from, size_t __to) { return __from; }
+ // Call if container is resized.
+ void __resize(size_t __from, size_t __to);
+
+ private:
+ size_t _M_init;
+ size_t _M_max; // range of # buckets
+ size_t _M_min;
+ size_t _M_total;
+ size_t _M_item_min; // range of # items
+ size_t _M_item_max;
+ size_t _M_item_total;
+ size_t _M_count;
+ size_t _M_resize;
+ size_t _M_cost;
+};
+
+inline const char* __container_size_info::__advice() const
+{
+ const size_t __max_chars_size_t_printed = 20;
+ const char* __message_pattern =
+ "change initial container size from %d to %d";
+ size_t __message_size = (strlen(__message_pattern)
+ + 2 * __max_chars_size_t_printed
+ - 2 * 2);
+ char* __message = new char[__message_size + 1];
+
+ if (_M_init < _M_item_max)
+ snprintf(__message, __message_size, __message_pattern, _M_init,
+ _M_item_max);
+ else
+ snprintf(__message, __message_size, __message_pattern, _M_init,
+ _M_item_max);
+
+ return __message;
+}
+
+inline void __container_size_info::__destruct(size_t __num, size_t __inum)
+{
+ _M_max = __max(_M_max, __num);
+ _M_item_max = __max(_M_item_max, __inum);
+ if (_M_min == 0) {
+ _M_min = __num;
+ _M_item_min = __inum;
+ } else {
+ _M_min = __min(_M_min, __num);
+ _M_item_min = __min(_M_item_min, __inum);
+ }
+ _M_total += __num;
+ _M_item_total += __inum;
+ _M_count += 1;
+}
+
+inline void __container_size_info::__resize(size_t __from, size_t __to)
+{
+ _M_cost += this->__resize_cost(__from, __to);
+ _M_resize += 1;
+ _M_max = __max(_M_max, __to);
+}
+
+inline __container_size_info::__container_size_info(__stack_t __stack,
+ size_t __num)
+ : __object_info_base(__stack), _M_init(0), _M_max(0), _M_item_max(0),
+ _M_min(0), _M_item_min(0), _M_total(0), _M_item_total(0), _M_cost(0),
+ _M_count(0), _M_resize(0)
+{
+ _M_init = _M_max = __num;
+ _M_item_min = _M_item_max = _M_item_total = _M_total = 0;
+ _M_min = 0;
+ _M_count = 0;
+ _M_resize = 0;
+}
+
+inline void __container_size_info::__merge(const __container_size_info& __o)
+{
+ _M_init = __max(_M_init, __o._M_init);
+ _M_max = __max(_M_max, __o._M_max);
+ _M_item_max = __max(_M_item_max, __o._M_item_max);
+ _M_min = __min(_M_min, __o._M_min);
+ _M_item_min = __min(_M_item_min, __o._M_item_min);
+ _M_total += __o._M_total;
+ _M_item_total += __o._M_item_total;
+ _M_count += __o._M_count;
+ _M_cost += __o._M_cost;
+ _M_resize += __o._M_resize;
+}
+
+inline __container_size_info::__container_size_info()
+ : _M_init(0), _M_max(0), _M_item_max(0), _M_min(0), _M_item_min(0),
+ _M_total(0), _M_item_total(0), _M_cost(0), _M_count(0), _M_resize(0)
+{
+}
+
+inline __container_size_info::__container_size_info(
+ const __container_size_info& __o)
+ : __object_info_base(__o)
+{
+ _M_init = __o._M_init;
+ _M_max = __o._M_max;
+ _M_item_max = __o._M_item_max;
+ _M_min = __o._M_min;
+ _M_item_min = __o._M_item_min;
+ _M_total = __o._M_total;
+ _M_item_total = __o._M_item_total;
+ _M_cost = __o._M_cost;
+ _M_count = __o._M_count;
+ _M_resize = __o._M_resize;
+}
+
+/** @brief A container size instrumentation line in the stack table. */
+class __container_size_stack_info: public __container_size_info
+{
+ public:
+ __container_size_stack_info(const __container_size_info& __o)
+ : __container_size_info(__o) {}
+};
+
+/** @brief Container size instrumentation trace producer. */
+class __trace_container_size
+ : public __trace_base<__container_size_info, __container_size_stack_info>
+{
+ public:
+ ~__trace_container_size() {}
+ __trace_container_size()
+ : __trace_base<__container_size_info, __container_size_stack_info>() {};
+
+ // Insert a new node at construct with object, callstack and initial size.
+ void __insert(const __object_t __obj, __stack_t __stack, size_t __num);
+ // Call at destruction/clean to set container final size.
+ void __destruct(const void* __obj, size_t __num, size_t __inum);
+ void __construct(const void* __obj, size_t __inum);
+ // Call at resize to set resize/cost information.
+ void __resize(const void* __obj, int __from, int __to);
+};
+
+inline void __trace_container_size::__insert(const __object_t __obj,
+ __stack_t __stack, size_t __num)
+{
+ __add_object(__obj, __container_size_info(__stack, __num));
+}
+
+inline void __container_size_info::__write(FILE* __f) const
+{
+ fprintf(__f, "%Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu %Zu\n",
+ _M_init, _M_count, _M_cost, _M_resize, _M_min, _M_max, _M_total,
+ _M_item_min, _M_item_max, _M_item_total);
+}
+
+inline void __trace_container_size::__destruct(const void* __obj,
+ size_t __num, size_t __inum)
+{
+ if (!__is_on()) return;
+
+ __object_t __obj_handle = static_cast<__object_t>(__obj);
+
+ __container_size_info* __object_info = __get_object_info(__obj_handle);
+ if (!__object_info)
+ return;
+
+ __object_info->__destruct(__num, __inum);
+ __retire_object(__obj_handle);
+}
+
+inline void __trace_container_size::__resize(const void* __obj, int __from,
+ int __to)
+{
+ if (!__is_on()) return;
+
+ __container_size_info* __object_info = __get_object_info(__obj);
+ if (!__object_info)
+ return;
+
+ __object_info->__resize(__from, __to);
+}
+
+} // namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_CONTAINER_SIZE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_hash_func.h b/libstdc++-v3/include/profile/impl/profiler_hash_func.h
new file mode 100644
index 00000000000..cf639545163
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_hash_func.h
@@ -0,0 +1,192 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_trace.h
+ * @brief Data structures to represent profiling traces.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_HASH_FUNC_H__
+#define PROFCXX_PROFILER_HASH_FUNC_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+
+namespace __cxxprof_impl
+{
+
+/** @brief A hash performance instrumentation line in the object table. */
+class __hashfunc_info: public __object_info_base
+{
+ public:
+ __hashfunc_info()
+ :_M_longest_chain(0), _M_accesses(0), _M_hops(0) {}
+ __hashfunc_info(const __hashfunc_info& o);
+ __hashfunc_info(__stack_t __stack)
+ : __object_info_base(__stack),
+ _M_longest_chain(0), _M_accesses(0), _M_hops(0){}
+ virtual ~__hashfunc_info() {}
+
+ void __merge(const __hashfunc_info& __o);
+ void __destruct(size_t __chain, size_t __accesses, size_t __hops);
+ void __write(FILE* __f) const;
+ float __magnitude() const { return static_cast<float>(_M_hops); }
+ const char* __advice() const { return "change hash function"; }
+
+private:
+ size_t _M_longest_chain;
+ size_t _M_accesses;
+ size_t _M_hops;
+};
+
+inline __hashfunc_info::__hashfunc_info(const __hashfunc_info& __o)
+ : __object_info_base(__o)
+{
+ _M_longest_chain = __o._M_longest_chain;
+ _M_accesses = __o._M_accesses;
+ _M_hops = __o._M_hops;
+}
+
+inline void __hashfunc_info::__merge(const __hashfunc_info& __o)
+{
+ _M_longest_chain = __max(_M_longest_chain, __o._M_longest_chain);
+ _M_accesses += __o._M_accesses;
+ _M_hops += __o._M_hops;
+}
+
+inline void __hashfunc_info::__destruct(size_t __chain, size_t __accesses,
+ size_t __hops)
+{
+ _M_longest_chain = __max(_M_longest_chain, __chain);
+ _M_accesses += __accesses;
+ _M_hops += __hops;
+}
+
+/** @brief A hash performance instrumentation line in the stack table. */
+class __hashfunc_stack_info: public __hashfunc_info {
+ public:
+ __hashfunc_stack_info(const __hashfunc_info& __o) : __hashfunc_info(__o) {}
+};
+
+/** @brief Hash performance instrumentation producer. */
+class __trace_hash_func
+ : public __trace_base<__hashfunc_info, __hashfunc_stack_info>
+{
+ public:
+ __trace_hash_func();
+ ~__trace_hash_func() {}
+
+ // Insert a new node at construct with object, callstack and initial size.
+ void __insert(__object_t __obj, __stack_t __stack);
+ // Call at destruction/clean to set container final size.
+ void __destruct(const void* __obj, size_t __chain,
+ size_t __accesses, size_t __hops);
+};
+
+inline __trace_hash_func::__trace_hash_func()
+ : __trace_base<__hashfunc_info, __hashfunc_stack_info>()
+{
+ __id = "hash-distr";
+}
+
+inline void __trace_hash_func::__insert(__object_t __obj, __stack_t __stack)
+{
+ __add_object(__obj, __hashfunc_info(__stack));
+}
+
+inline void __hashfunc_info::__write(FILE* __f) const
+{
+ fprintf(__f, "%Zu %Zu %Zu\n", _M_hops, _M_accesses, _M_longest_chain);
+}
+
+inline void __trace_hash_func::__destruct(const void* __obj, size_t __chain,
+ size_t __accesses, size_t __hops)
+{
+ if (!__is_on()) return;
+
+ // First find the item from the live objects and update the informations.
+ __hashfunc_info* __objs = __get_object_info(__obj);
+ if (!__objs)
+ return;
+
+ __objs->__destruct(__chain, __accesses, __hops);
+ __retire_object(__obj);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Initialization and report.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_hash_func_init()
+{
+ __tables<0>::_S_hash_func = new __trace_hash_func();
+}
+
+inline void __trace_hash_func_report(FILE* __f,
+ __warning_vector_t& __warnings)
+{
+ if (__tables<0>::_S_hash_func) {
+ __tables<0>::_S_hash_func->__collect_warnings(__warnings);
+ __tables<0>::_S_hash_func->__write(__f);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Implementations of instrumentation hooks.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_hash_func_construct(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_hash_func->__insert(__obj, __get_stack());
+}
+
+inline void __trace_hash_func_destruct(const void* __obj, size_t __chain,
+ size_t __accesses, size_t __hops)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_hash_func->__destruct(__obj, __chain, __accesses, __hops);
+}
+
+} // namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_HASH_FUNC_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
new file mode 100644
index 00000000000..2192879325e
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
@@ -0,0 +1,115 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_hashtable_size.cc
+ * @brief Collection of hashtable size traces.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_HASHTABLE_SIZE_H__
+#define PROFCXX_PROFILER_HASHTABLE_SIZE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+#include "profile/impl/profiler_state.h"
+#include "profile/impl/profiler_container_size.h"
+
+namespace __cxxprof_impl
+{
+
+/** @brief Hashtable size instrumentation trace producer. */
+class __trace_hashtable_size : public __trace_container_size
+{
+ public:
+ __trace_hashtable_size() : __trace_container_size()
+ {
+ __id = "hashtable-size";
+ }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Initialization and report.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_hashtable_size_init()
+{
+ __tables<0>::_S_hashtable_size = new __trace_hashtable_size();
+}
+
+inline void __trace_hashtable_size_report(FILE* __f,
+ __warning_vector_t& __warnings)
+{
+ if (__tables<0>::_S_hashtable_size) {
+ __tables<0>::_S_hashtable_size->__collect_warnings(__warnings);
+ __tables<0>::_S_hashtable_size->__write(__f);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Implementations of instrumentation hooks.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_hashtable_size_construct(const void* __obj, size_t __num)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_hashtable_size->__insert(__obj, __get_stack(), __num);
+}
+
+inline void __trace_hashtable_size_destruct(const void* __obj, size_t __num,
+ size_t __inum)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_hashtable_size->__destruct(__obj, __num, __inum);
+}
+
+inline void __trace_hashtable_size_resize(const void* __obj, size_t __from,
+ size_t __to)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_hashtable_size->__resize(__obj, __from, __to);
+}
+
+} // namespace __cxxprof_impl
+
+#endif /* PROFCXX_PROFILER_HASHTABLE_SIZE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
new file mode 100644
index 00000000000..cdb88a86bcb
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
@@ -0,0 +1,305 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_map_to_unordered_map.h
+ * @brief Diagnostics for map to unordered_map.
+ */
+
+// Written by Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_MAP_TO_UNORDERED_MAP_H__
+#define PROFCXX_PROFILER_MAP_TO_UNORDERED_MAP_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+
+namespace __cxxprof_impl
+{
+
+// Cost model. XXX: this must be taken from the machine model instead.
+// Map operations:
+// - insert: 1.5 * log(size)
+// - erase: 1.5 * log(size)
+// - find: log(size)
+// - iterate: 2.3
+// Unordered map operations:
+// - insert: 12
+// - erase: 12
+// - find: 10
+// - iterate: 1.7
+
+const float __map_insert_cost_factor = 1.5;
+const float __map_erase_cost_factor = 1.5;
+const float __map_find_cost_factor = 1;
+const float __map_iterate_cost = 2.3;
+
+const float __umap_insert_cost = 12.0;
+const float __umap_erase_cost = 12.0;
+const float __umap_find_cost = 10.0;
+const float __umap_iterate_cost = 1.7;
+
+inline int __log2(size_t __size)
+{
+ for (int __bit_count = sizeof(size_t) - 1; __bit_count >= 0; --__bit_count) {
+ if ((2 << __bit_count) & __size) {
+ return __bit_count;
+ }
+ }
+ return 0;
+}
+
+inline float __map_insert_cost(size_t __size)
+{
+ return __map_insert_cost_factor * static_cast<float>(__log2(__size));
+}
+
+inline float __map_erase_cost(size_t __size)
+{
+ return __map_erase_cost_factor * static_cast<float>(__log2(__size));
+}
+
+inline float __map_find_cost(size_t __size)
+{
+ return __map_find_cost_factor * static_cast<float>(__log2(__size));
+}
+
+/** @brief A map-to-unordered_map instrumentation line in the object table. */
+class __map2umap_info: public __object_info_base
+{
+ public:
+ __map2umap_info()
+ : _M_insert(0), _M_erase(0), _M_find(0), _M_iterate(0),
+ _M_map_cost(0.0), _M_umap_cost(0.0), _M_valid(true) {}
+ __map2umap_info(__stack_t __stack)
+ : __object_info_base(__stack), _M_insert(0), _M_erase(0), _M_find(0),
+ _M_iterate(0), _M_map_cost(0.0), _M_umap_cost(0.0), _M_valid(true) {}
+ virtual ~__map2umap_info() {}
+ __map2umap_info(const __map2umap_info& o);
+ void __merge(const __map2umap_info& o);
+ void __write(FILE* __f) const;
+ float __magnitude() const { return _M_map_cost - _M_umap_cost; }
+ const char* __advice() const;
+
+ void __record_insert(size_t __size, size_t __count);
+ void __record_erase(size_t __size, size_t __count);
+ void __record_find(size_t __size);
+ void __record_iterate(size_t __count);
+ void __record_invalidate();
+
+ private:
+ size_t _M_insert;
+ size_t _M_erase;
+ size_t _M_find;
+ size_t _M_iterate;
+ float _M_umap_cost;
+ float _M_map_cost;
+ bool _M_valid;
+};
+
+inline const char* __map2umap_info::__advice() const
+{
+ return "change std::map to std::unordered_map";
+}
+
+inline __map2umap_info::__map2umap_info(const __map2umap_info& __o)
+ : __object_info_base(__o),
+ _M_insert(__o._M_insert),
+ _M_erase(__o._M_erase),
+ _M_find(__o._M_find),
+ _M_iterate(__o._M_iterate),
+ _M_map_cost(__o._M_map_cost),
+ _M_umap_cost(__o._M_umap_cost),
+ _M_valid(__o._M_valid)
+{}
+
+inline void __map2umap_info::__merge(const __map2umap_info& __o)
+{
+ _M_insert += __o._M_insert;
+ _M_erase += __o._M_erase;
+ _M_find += __o._M_find;
+ _M_map_cost += __o._M_map_cost;
+ _M_umap_cost += __o._M_umap_cost;
+ _M_valid &= __o._M_valid;
+}
+
+inline void __map2umap_info:: __record_insert(size_t __size, size_t __count)
+{
+ _M_insert += __count;
+ _M_map_cost += __count * __map_insert_cost(__size);
+ _M_umap_cost += __count * __umap_insert_cost;
+}
+
+inline void __map2umap_info:: __record_erase(size_t __size, size_t __count)
+{
+ _M_erase += __count;
+ _M_map_cost += __count * __map_erase_cost(__size);
+ _M_umap_cost += __count * __umap_erase_cost;
+}
+
+inline void __map2umap_info:: __record_find(size_t __size)
+{
+ _M_find += 1;
+ _M_map_cost += __map_find_cost(__size);
+ _M_umap_cost += __umap_find_cost;
+}
+
+inline void __map2umap_info:: __record_iterate(size_t __count)
+{
+ _M_iterate += __count;
+ _M_map_cost += __count * __map_iterate_cost;
+ _M_umap_cost += __count * __umap_iterate_cost;
+}
+
+inline void __map2umap_info:: __record_invalidate()
+{
+ _M_valid = false;
+}
+
+inline void __map2umap_info::__write(FILE* __f) const
+{
+ fprintf(__f, "%Zu %Zu %Zu %Zu %.0f %.0f %s\n",
+ _M_insert, _M_erase, _M_find, _M_iterate, _M_map_cost, _M_umap_cost,
+ _M_valid ? "valid" : "invalid");
+}
+
+/** @brief A map-to-unordered_map instrumentation line in the stack table. */
+class __map2umap_stack_info: public __map2umap_info
+{
+ public:
+ __map2umap_stack_info(const __map2umap_info& o) : __map2umap_info(o) {}
+};
+
+/** @brief Map-to-unordered_map instrumentation producer. */
+class __trace_map2umap
+ : public __trace_base<__map2umap_info, __map2umap_stack_info>
+{
+ public:
+ __trace_map2umap();
+};
+
+inline __trace_map2umap::__trace_map2umap()
+ : __trace_base<__map2umap_info, __map2umap_stack_info>()
+{
+ __id = "map-to-unordered-map";
+}
+
+inline void __trace_map_to_unordered_map_init()
+{
+ __tables<0>::_S_map2umap = new __trace_map2umap();
+}
+
+inline void __trace_map_to_unordered_map_report(
+ FILE* __f, __warning_vector_t& __warnings)
+{
+ if (__tables<0>::_S_map2umap) {
+ __tables<0>::_S_map2umap->__collect_warnings(__warnings);
+ __tables<0>::_S_map2umap->__write(__f);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Implementations of instrumentation hooks.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_map_to_unordered_map_construct(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_map2umap->__add_object(__obj,
+ __map2umap_info(__get_stack()));
+}
+
+inline void __trace_map_to_unordered_map_destruct(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_map2umap->__retire_object(__obj);
+}
+
+inline void __trace_map_to_unordered_map_insert(const void* __obj,
+ size_t __size, size_t __count)
+{
+ if (!__profcxx_init()) return;
+
+ __map2umap_info* __info = __tables<0>::_S_map2umap->__get_object_info(__obj);
+
+ if (__info) __info->__record_insert(__size, __count);
+}
+
+inline void __trace_map_to_unordered_map_erase(const void* __obj,
+ size_t __size, size_t __count)
+{
+ if (!__profcxx_init()) return;
+
+ __map2umap_info* __info = __tables<0>::_S_map2umap->__get_object_info(__obj);
+
+ if (__info) __info->__record_erase(__size, __count);
+}
+
+inline void __trace_map_to_unordered_map_find(const void* __obj, size_t __size)
+{
+ if (!__profcxx_init()) return;
+
+ __map2umap_info* __info = __tables<0>::_S_map2umap->__get_object_info(__obj);
+
+ if (__info) __info->__record_find(__size);
+}
+
+inline void __trace_map_to_unordered_map_iterate(const void* __obj,
+ size_t __count)
+{
+ if (!__profcxx_init()) return;
+
+ __map2umap_info* __info = __tables<0>::_S_map2umap->__get_object_info(__obj);
+
+ if (__info) __info->__record_iterate(__count);
+}
+
+inline void __trace_map_to_unordered_map_invalidate(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __map2umap_info* __info = __tables<0>::_S_map2umap->__get_object_info(__obj);
+
+ if (__info) __info->__record_invalidate();
+}
+
+} // namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_MAP_TO_UNORDERED_MAP_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_node.h b/libstdc++-v3/include/profile/impl/profiler_node.h
new file mode 100644
index 00000000000..cd2b9ab2016
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_node.h
@@ -0,0 +1,172 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_node.h
+ * @brief Data structures to represent a single profiling event.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_NODE_H__
+#define PROFCXX_PROFILER_NODE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdio>
+#include <cstdint>
+#include <cstring>
+#else
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#endif
+#include <vector>
+#if defined HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
+namespace __cxxprof_impl
+{
+typedef const void* __object_t;
+typedef void* __instruction_address_t;
+typedef std::_GLIBCXX_STD_PR::vector<__instruction_address_t> __stack_npt;
+typedef __stack_npt* __stack_t;
+
+size_t __stack_max_depth();
+
+inline __stack_t __get_stack()
+{
+#if defined HAVE_EXECINFO_H
+ size_t __max_depth = __stack_max_depth();
+ if (__max_depth == 0)
+ return NULL;
+ __stack_npt __buffer(__max_depth);
+ int __depth = backtrace(&__buffer[0], __max_depth);
+ __stack_t __stack = new __stack_npt(__depth);
+ memcpy(&(*__stack)[0], &__buffer[0], __depth * sizeof(__object_t));
+ return __stack;
+#else
+ return NULL;
+#endif
+}
+
+inline __size(const __stack_t& __stack)
+{
+ if (!__stack) {
+ return 0;
+ } else {
+ return __stack->size();
+ }
+}
+
+inline void __write(FILE* __f, const __stack_t __stack)
+{
+ if (!__stack) {
+ return;
+ }
+
+ __stack_npt::const_iterator __it;
+ for (__it = __stack->begin(); __it != __stack->end(); ++__it) {
+ fprintf(__f, "%p ", *__it);
+ }
+}
+
+/** @brief Hash function for summary trace using call stack as index. */
+class __stack_hash
+{
+ public:
+ size_t operator()(const __stack_t __s) const
+ {
+ if (!__s) {
+ return 0;
+ }
+
+ uintptr_t __index = 0;
+ __stack_npt::const_iterator __it;
+ for (__it = __s->begin(); __it != __s->end(); ++__it) {
+ __index += reinterpret_cast<uintptr_t>(*__it);
+ }
+ return __index;
+ }
+
+ bool operator() (const __stack_t __stack1, const __stack_t __stack2) const
+ {
+ if (!__stack1 && !__stack2) return true;
+ if (!__stack1 || !__stack2) return false;
+ if (__stack1->size() != __stack2->size()) return false;
+
+ size_t __byte_size = __stack1->size() * sizeof(__stack_npt::value_type);
+ return memcmp(&(*__stack1)[0], &(*__stack2)[0], __byte_size) == 0;
+ }
+};
+
+/** @brief Base class for a line in the object table. */
+class __object_info_base
+{
+ public:
+ __object_info_base() {}
+ __object_info_base(__stack_t __stack);
+ __object_info_base(const __object_info_base& o);
+ virtual ~__object_info_base() {}
+ bool __is_valid() const { return _M_valid; }
+ __stack_t __stack() const { return _M_stack; }
+ virtual void __write(FILE* f) const = 0;
+
+ protected:
+ __stack_t _M_stack;
+ bool _M_valid;
+};
+
+inline __object_info_base::__object_info_base(__stack_t __stack)
+{
+ _M_stack = __stack;
+ _M_valid = true;
+}
+
+inline __object_info_base::__object_info_base(const __object_info_base& __o)
+{
+ _M_stack = __o._M_stack;
+ _M_valid = __o._M_valid;
+}
+
+/** @brief Base class for a line in the stack table. */
+template<typename __object_info>
+class __stack_info_base
+{
+ public:
+ __stack_info_base() {}
+ __stack_info_base(const __object_info& __info) = 0;
+ virtual ~__stack_info_base() {}
+ void __merge(const __object_info& __info) = 0;
+ virtual float __magnitude() const = 0;
+ virtual const char* __get_id() const = 0;
+};
+
+} // namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_NODE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_state.h b/libstdc++-v3/include/profile/impl/profiler_state.h
new file mode 100644
index 00000000000..64c10db616c
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_state.h
@@ -0,0 +1,107 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_state.cc
+ * @brief Global profiler state.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_STATE_H__
+#define PROFCXX_PROFILER_STATE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdio>
+#else
+#include <stdio.h>
+#endif
+
+namespace __cxxprof_impl
+{
+
+/** @brief Profiling mode on/off state. */
+template <int _Unused=0>
+class __state
+{
+ public:
+
+ static __state<_Unused>* _S_diag_state;
+
+ __state() : _M_state(__INVALID) {}
+ ~__state() {}
+
+ bool __is_on() { return _M_state == __ON; }
+ bool __is_off() { return _M_state == __OFF; }
+ bool __is_invalid() { return _M_state == __INVALID; }
+ void __turn_on() { _M_state = __ON; }
+ void __turn_off() { _M_state = __OFF; }
+
+ private:
+ enum __state_type { __ON, __OFF, __INVALID };
+ __state_type _M_state;
+};
+
+template <int _Unused>
+__state<_Unused>* __state<_Unused>::_S_diag_state = NULL;
+
+inline bool __is_on()
+{
+ return __state<0>::_S_diag_state && __state<0>::_S_diag_state->__is_on();
+}
+
+inline bool __is_off()
+{
+ return __state<0>::_S_diag_state && __state<0>::_S_diag_state->__is_off();
+}
+
+inline bool __is_invalid()
+{
+ return (!__state<0>::_S_diag_state
+ || __state<0>::_S_diag_state->__is_invalid());
+}
+
+inline void __turn_on()
+{
+ if (!__state<0>::_S_diag_state) {
+ __state<0>::_S_diag_state = new __state<0>();
+ }
+ __state<0>::_S_diag_state->__turn_on();
+}
+
+inline void __turn_off()
+{
+ if (!__state<0>::_S_diag_state) {
+ __state<0>::_S_diag_state = new __state<0>();
+ }
+ __state<0>::_S_diag_state->__turn_off();
+}
+
+} // end namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_STATE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_trace.h b/libstdc++-v3/include/profile/impl/profiler_trace.h
new file mode 100644
index 00000000000..37bcb6436e5
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_trace.h
@@ -0,0 +1,564 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_trace.h
+ * @brief Data structures to represent profiling traces.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_TRACE_H__
+#define PROFCXX_PROFILER_TRACE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cerrno>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#define _GLIBCXX_IMPL_UNORDERED_MAP std::_GLIBCXX_STD_PR::unordered_map
+#include <unordered_map>
+#else
+#include <errno.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <tr1/unordered_map>
+#define _GLIBCXX_IMPL_UNORDERED_MAP std::tr1::unordered_map
+#endif
+
+#include <algorithm>
+#include <utility>
+
+#if defined _GLIBCXX_PROFILE_THREADS && defined HAVE_TLS
+#include <pthread.h>
+#endif
+
+#include "profile/impl/profiler_state.h"
+#include "profile/impl/profiler_node.h"
+
+namespace __cxxprof_impl
+{
+
+#if defined _GLIBCXX_PROFILE_THREADS && defined HAVE_TLS
+#define _GLIBCXX_IMPL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+typedef pthread_mutex_t __mutex_t;
+/** @brief Pthread mutex wrapper. */
+template <int _Unused=0>
+class __mutex {
+ public:
+ static __mutex_t __global_lock;
+ static void __lock(__mutex_t& __m) { pthread_mutex_lock(&__m); }
+ static void __unlock(__mutex_t& __m) { pthread_mutex_unlock(&__m); }
+};
+#else
+#define _GLIBCXX_IMPL_MUTEX_INITIALIZER 0
+typedef int __mutex_t;
+/** @brief Mock mutex interface. */
+template <int _Unused=0>
+class __mutex {
+ public:
+ static __mutex_t __global_lock;
+ static void __lock(__mutex_t& __m) {}
+ static void __unlock(__mutex_t& __m) {}
+};
+#endif
+
+template <int _Unused>
+__mutex_t __mutex<_Unused>::__global_lock = _GLIBCXX_IMPL_MUTEX_INITIALIZER;
+
+/** @brief Representation of a warning. */
+struct __warning_data
+{
+ float __magnitude;
+ __stack_t __context;
+ const char* __warning_id;
+ const char* __warning_message;
+ __warning_data();
+ __warning_data(float __m, __stack_t __c, const char* __id,
+ const char* __msg);
+ bool operator>(const struct __warning_data& other) const;
+};
+
+inline __warning_data::__warning_data()
+ : __magnitude(0.0), __context(NULL), __warning_id(NULL),
+ __warning_message(NULL)
+{
+}
+
+inline __warning_data::__warning_data(float __m, __stack_t __c,
+ const char* __id, const char* __msg)
+ : __magnitude(__m), __context(__c), __warning_id(__id),
+ __warning_message(__msg)
+{
+}
+
+inline bool __warning_data::operator>(const struct __warning_data& other) const
+{
+ return __magnitude > other.__magnitude;
+}
+
+typedef std::_GLIBCXX_STD_PR::vector<__warning_data> __warning_vector_t;
+
+// Defined in profiler_<diagnostic name>.h.
+class __trace_hash_func;
+class __trace_hashtable_size;
+class __trace_map2umap;
+class __trace_vector_size;
+class __trace_vector_to_list;
+void __trace_vector_size_init();
+void __trace_hashtable_size_init();
+void __trace_hash_func_init();
+void __trace_vector_to_list_init();
+void __trace_map_to_unordered_map_init();
+void __trace_vector_size_report(FILE*, __warning_vector_t&);
+void __trace_hashtable_size_report(FILE*, __warning_vector_t&);
+void __trace_hash_func_report(FILE*, __warning_vector_t&);
+void __trace_vector_to_list_report(FILE*, __warning_vector_t&);
+void __trace_map_to_unordered_map_report(FILE*, __warning_vector_t&);
+
+// Utility functions.
+inline size_t __max(size_t __a, size_t __b)
+{
+ return __a >= __b ? __a : __b;
+}
+
+inline size_t __min(size_t __a, size_t __b)
+{
+ return __a <= __b ? __a : __b;
+}
+
+/** @brief Storage for diagnostic table entries. Has only static fields. */
+template <int _Unused=0>
+class __tables
+{
+ public:
+ static __trace_hash_func* _S_hash_func;
+ static __trace_hashtable_size* _S_hashtable_size;
+ static __trace_map2umap* _S_map2umap;
+ static __trace_vector_size* _S_vector_size;
+ static __trace_vector_to_list* _S_vector_to_list;
+};
+
+template <int _Unused>
+__trace_hash_func* __tables<_Unused>::_S_hash_func = NULL;
+template <int _Unused>
+__trace_hashtable_size* __tables<_Unused>::_S_hashtable_size = NULL;
+template <int _Unused>
+__trace_map2umap* __tables<_Unused>::_S_map2umap = NULL;
+template <int _Unused>
+__trace_vector_size* __tables<_Unused>::_S_vector_size = NULL;
+template <int _Unused>
+__trace_vector_to_list* __tables<_Unused>::_S_vector_to_list = NULL;
+
+/** @brief Storage for user defined parameters. Has only static fields. */
+template <int _Unused=0>
+class __settings {
+ public:
+ static const char* _S_trace_file_name;
+ static size_t _S_max_warn_count;
+ static size_t _S_max_stack_depth;
+ static size_t _S_max_mem;
+};
+
+template <int _Unused>
+const char* __settings<_Unused>::_S_trace_file_name =
+ _GLIBCXX_PROFILE_TRACE_PATH_ROOT;
+template <int _Unused>
+size_t __settings<_Unused>::_S_max_warn_count =
+ _GLIBCXX_PROFILE_MAX_WARN_COUNT;
+template <int _Unused>
+size_t __settings<_Unused>::_S_max_stack_depth =
+ _GLIBCXX_PROFILE_MAX_STACK_DEPTH;
+template <int _Unused>
+size_t __settings<_Unused>::_S_max_mem =
+ _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC;
+
+inline size_t __stack_max_depth()
+{
+ return __settings<0>::_S_max_stack_depth;
+}
+
+inline size_t __max_mem()
+{
+ return __settings<0>::_S_max_mem;
+}
+
+/** @brief Base class for all trace producers. */
+template <typename __object_info, typename __stack_info>
+class __trace_base
+{
+ public:
+ __trace_base();
+ virtual ~__trace_base() {}
+
+ void __add_object(__object_t object, __object_info __info);
+ __object_info* __get_object_info(__object_t __object);
+ void __retire_object(__object_t __object);
+ void __write(FILE* f);
+ void __collect_warnings(__warning_vector_t& warnings);
+
+ void __lock_object_table();
+ void __lock_stack_table();
+ void __unlock_object_table();
+ void __unlock_stack_table();
+
+ private:
+ __mutex_t __object_table_lock;
+ __mutex_t __stack_table_lock;
+ typedef _GLIBCXX_IMPL_UNORDERED_MAP<__object_t,
+ __object_info> __object_table_t;
+ typedef _GLIBCXX_IMPL_UNORDERED_MAP<__stack_t, __stack_info, __stack_hash,
+ __stack_hash> __stack_table_t;
+ __object_table_t __object_table;
+ __stack_table_t __stack_table;
+ size_t __stack_table_byte_size;
+
+ protected:
+ const char* __id;
+};
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__collect_warnings(
+ __warning_vector_t& warnings)
+{
+ typename __stack_table_t::iterator __i = __stack_table.begin();
+ for ( ; __i != __stack_table.end(); ++__i )
+ {
+ warnings.push_back(__warning_data((*__i).second.__magnitude(),
+ (*__i).first,
+ __id,
+ (*__i).second.__advice()));
+ }
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__lock_object_table()
+{
+ __mutex<0>::__lock(this->__object_table_lock);
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__lock_stack_table()
+{
+ __mutex<0>::__lock(this->__stack_table_lock);
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__unlock_object_table()
+{
+ __mutex<0>::__unlock(this->__object_table_lock);
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__unlock_stack_table()
+{
+ __mutex<0>::__unlock(this->__stack_table_lock);
+}
+
+template <typename __object_info, typename __stack_info>
+__trace_base<__object_info, __stack_info>::__trace_base()
+{
+ // Do not pick the initial size too large, as we don't know which diagnostics
+ // are more active.
+ __object_table.rehash(10000);
+ __stack_table.rehash(10000);
+ __stack_table_byte_size = 0;
+ __id = NULL;
+ __object_table_lock = __stack_table_lock = _GLIBCXX_IMPL_MUTEX_INITIALIZER;
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__add_object(
+ __object_t __object, __object_info __info)
+{
+ if (__max_mem() == 0
+ || __object_table.size() * sizeof(__object_info) <= __max_mem()) {
+ __lock_object_table();
+ __object_table.insert(
+ typename __object_table_t::value_type(__object, __info));
+ __unlock_object_table();
+ }
+}
+
+template <typename __object_info, typename __stack_info>
+__object_info* __trace_base<__object_info, __stack_info>::__get_object_info(
+ __object_t __object)
+{
+ // XXX: Revisit this to see if we can decrease mutex spans.
+ // Without this mutex, the object table could be rehashed during an
+ // insertion on another thread, which could result in a segfault.
+ __lock_object_table();
+ typename __object_table_t::iterator __object_it =
+ __object_table.find(__object);
+ if (__object_it == __object_table.end()){
+ __unlock_object_table();
+ return NULL;
+ } else {
+ __unlock_object_table();
+ return &__object_it->second;
+ }
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__retire_object(
+ __object_t __object)
+{
+ __lock_object_table();
+ __lock_stack_table();
+ typename __object_table_t::iterator __object_it =
+ __object_table.find(__object);
+ if (__object_it != __object_table.end()){
+ const __object_info& __info = __object_it->second;
+ const __stack_t& __stack = __info.__stack();
+ typename __stack_table_t::iterator __stack_it =
+ __stack_table.find(__stack);
+ if (__stack_it == __stack_table.end()) {
+ // First occurence of this call context.
+ if (__max_mem() == 0 || __stack_table_byte_size < __max_mem()) {
+ __stack_table_byte_size +=
+ (sizeof(__instruction_address_t) * __size(__stack)
+ + sizeof(__stack) + sizeof(__stack_info));
+ __stack_table.insert(make_pair(__stack, __stack_info(__info)));
+ }
+ } else {
+ // Merge object info into info summary for this call context.
+ __stack_it->second.__merge(__info);
+ delete __stack;
+ }
+ __object_table.erase(__object);
+ }
+ __unlock_stack_table();
+ __unlock_object_table();
+}
+
+template <typename __object_info, typename __stack_info>
+void __trace_base<__object_info, __stack_info>::__write(FILE* __f)
+{
+ typename __stack_table_t::iterator __it;
+
+ for (__it = __stack_table.begin(); __it != __stack_table.end(); __it++) {
+ if (__it->second.__is_valid()) {
+ fprintf(__f, __id);
+ fprintf(__f, "|");
+ __cxxprof_impl::__write(__f, __it->first);
+ fprintf(__f, "|");
+ __it->second.__write(__f);
+ }
+ }
+}
+
+inline size_t __env_to_size_t(const char* __env_var, size_t __default_value)
+{
+ char* __env_value = getenv(__env_var);
+ if (__env_value) {
+ long int __converted_value = strtol(__env_value, NULL, 10);
+ if (errno || __converted_value < 0) {
+ fprintf(stderr, "Bad value for environment variable '%s'.", __env_var);
+ abort();
+ } else {
+ return static_cast<size_t>(__converted_value);
+ }
+ } else {
+ return __default_value;
+ }
+}
+
+inline void __set_max_stack_trace_depth()
+{
+ __settings<0>::_S_max_stack_depth = __env_to_size_t(
+ _GLIBCXX_PROFILE_MAX_STACK_DEPTH_ENV_VAR,
+ __settings<0>::_S_max_stack_depth);
+}
+
+inline void __set_max_mem()
+{
+ __settings<0>::_S_max_mem = __env_to_size_t(
+ _GLIBCXX_PROFILE_MEM_PER_DIAGNOSTIC_ENV_VAR, __settings<0>::_S_max_mem);
+}
+
+inline int __log_magnitude(float f)
+{
+ const float log_base = 10.0;
+ int result = 0;
+ int sign = 1;
+ if (f < 0) {
+ f = -f;
+ sign = -1;
+ }
+ while (f > log_base) {
+ ++result;
+ f /= 10.0;
+ }
+ return sign * result;
+}
+
+struct __warn
+{
+ FILE* __file;
+ __warn(FILE* __f) { __file = __f; }
+ void operator() (const __warning_data& __info)
+ {
+ fprintf(__file, __info.__warning_id);
+ fprintf(__file, ": improvement = %d", __log_magnitude(__info.__magnitude));
+ fprintf(__file, ": call stack = ");
+ __cxxprof_impl::__write(__file, __info.__context);
+ fprintf(__file, ": advice = %s\n", __info.__warning_message);
+ }
+};
+
+inline FILE* __open_output_file(const char* extension)
+{
+ // The path is made of _S_trace_file_name + "." + extension.
+ size_t root_len = strlen(__settings<0>::_S_trace_file_name);
+ size_t ext_len = strlen(extension);
+ char* file_name = new char[root_len + 1 + ext_len + 1];
+ char* p = file_name;
+ memcpy(file_name, __settings<0>::_S_trace_file_name, root_len);
+ *(file_name + root_len) = '.';
+ memcpy(file_name + root_len + 1, extension, ext_len + 1);
+ FILE* out_file = fopen(file_name, "w");
+ if (out_file) {
+ return out_file;
+ } else {
+ fprintf(stderr, "Could not open trace file '%s'.", file_name);
+ abort();
+ }
+}
+
+/** @brief Final report method, registered with "atexit".
+ *
+ * This can also be called directly by user code, including signal handlers.
+ * It is protected against deadlocks by the reentrance guard in profiler.h.
+ * However, when called from a signal handler that triggers while within
+ * __cxxprof_impl (under the guarded zone), no output will be produced.
+ */
+inline void __report(void)
+{
+ __mutex<0>::__lock(__mutex<0>::__global_lock);
+
+ __warning_vector_t __warnings;
+
+ FILE* __raw_file = __open_output_file("raw");
+ __trace_vector_size_report(__raw_file, __warnings);
+ __trace_hashtable_size_report(__raw_file, __warnings);
+ __trace_hash_func_report(__raw_file, __warnings);
+ __trace_vector_to_list_report(__raw_file, __warnings);
+ __trace_map_to_unordered_map_report(__raw_file, __warnings);
+ fclose(__raw_file);
+
+ // Sort data by magnitude.
+ // XXX: instead of sorting, should collect only top N for better performance.
+ size_t __cutoff = __min(__settings<0>::_S_max_warn_count,
+ __warnings.size());
+
+ std::sort(__warnings.begin(), __warnings.end(),
+ std::greater<__warning_vector_t::value_type>());
+ __warnings.resize(__cutoff);
+
+ FILE* __warn_file = __open_output_file("txt");
+ std::for_each(__warnings.begin(), __warnings.end(), __warn(__warn_file));
+ fclose(__warn_file);
+
+ __mutex<0>::__unlock(__mutex<0>::__global_lock);
+}
+
+inline void __set_trace_path()
+{
+ char* __env_trace_file_name = getenv(_GLIBCXX_PROFILE_TRACE_ENV_VAR);
+
+ if (__env_trace_file_name) {
+ __settings<0>::_S_trace_file_name = __env_trace_file_name;
+ }
+
+ // Make sure early that we can create the trace file.
+ fclose(__open_output_file("txt"));
+}
+
+inline void __set_max_warn_count()
+{
+ char* __env_max_warn_count_str = getenv(
+ _GLIBCXX_PROFILE_MAX_WARN_COUNT_ENV_VAR);
+
+ if (__env_max_warn_count_str) {
+ __settings<0>::_S_max_warn_count = static_cast<size_t>(
+ atoi(__env_max_warn_count_str));
+ }
+}
+
+inline void __profcxx_init_unconditional()
+{
+ __mutex<0>::__lock(__mutex<0>::__global_lock);
+
+ __set_max_warn_count();
+
+ if (__is_invalid()) {
+
+ if (__settings<0>::_S_max_warn_count == 0) {
+
+ __turn_off();
+
+ } else {
+
+ __set_max_stack_trace_depth();
+ __set_max_mem();
+ __set_trace_path();
+
+ __trace_vector_size_init();
+ __trace_hashtable_size_init();
+ __trace_hash_func_init();
+ __trace_vector_to_list_init();
+ __trace_map_to_unordered_map_init();
+
+ atexit(__report);
+
+ __turn_on();
+
+ }
+ }
+
+ __mutex<0>::__unlock(__mutex<0>::__global_lock);
+}
+
+/** @brief This function must be called by each instrumentation point.
+ *
+ * The common path is inlined fully.
+ */
+inline bool __profcxx_init(void)
+{
+ if (__is_invalid()) {
+ __profcxx_init_unconditional();
+ }
+
+ return __is_on();
+}
+
+} // namespace __cxxprof_impl
+
+#endif /* PROFCXX_PROFILER_TRACE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_size.h b/libstdc++-v3/include/profile/impl/profiler_vector_size.h
new file mode 100644
index 00000000000..dd42959825f
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_vector_size.h
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_vector_size.h
+ * @brief Collection of vector size traces.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_VECTOR_SIZE_H__
+#define PROFCXX_PROFILER_VECTOR_SIZE_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#endif
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+#include "profile/impl/profiler_state.h"
+#include "profile/impl/profiler_container_size.h"
+
+namespace __cxxprof_impl
+{
+
+/** @brief Hashtable size instrumentation trace producer. */
+class __trace_vector_size : public __trace_container_size
+{
+ public:
+ __trace_vector_size() : __trace_container_size() { __id = "vector-size"; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Initialization and report.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_vector_size_init()
+{
+ __tables<0>::_S_vector_size = new __trace_vector_size();
+}
+
+inline void __trace_vector_size_report(FILE* __f,
+ __warning_vector_t& __warnings)
+{
+ if (__tables<0>::_S_vector_size) {
+ __tables<0>::_S_vector_size->__collect_warnings(__warnings);
+ __tables<0>::_S_vector_size->__write(__f);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Implementations of instrumentation hooks.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_vector_size_construct(const void* __obj, size_t __num)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_size->__insert(__obj, __get_stack(), __num);
+}
+
+inline void __trace_vector_size_destruct(const void* __obj, size_t __num,
+ size_t __inum)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_size->__destruct(__obj, __num, __inum);
+}
+
+inline void __trace_vector_size_resize(const void* __obj, size_t __from,
+ size_t __to)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_size->__resize(__obj, __from, __to);
+}
+
+} // namespace __cxxprof_impl
+
+#endif /* PROFCXX_PROFILER_VECTOR_SIZE_H__ */
diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
new file mode 100644
index 00000000000..ec3dfbcfb86
--- /dev/null
+++ b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
@@ -0,0 +1,318 @@
+// -*- C++ -*-
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/** @file profile/impl/profiler_trace.h
+ * @brief Data structures to represent profiling traces.
+ */
+
+// Written by Lixia Liu and Silvius Rus.
+
+#ifndef PROFCXX_PROFILER_VECTOR_TO_LIST_H__
+#define PROFCXX_PROFILER_VECTOR_TO_LIST_H__ 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#else
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#endif
+#include "profile/impl/profiler.h"
+#include "profile/impl/profiler_node.h"
+#include "profile/impl/profiler_trace.h"
+
+namespace __cxxprof_impl
+{
+
+/** @brief A vector-to-list instrumentation line in the object table. */
+class __vector2list_info: public __object_info_base
+{
+ public:
+ __vector2list_info()
+ :_M_shift_count(0), _M_iterate(0), _M_resize(0), _M_list_cost(0),
+ _M_vector_cost(0), _M_valid(true) {}
+ __vector2list_info(__stack_t __stack)
+ : __object_info_base(__stack), _M_shift_count(0), _M_iterate(0),
+ _M_resize(0), _M_list_cost(0), _M_vector_cost(0), _M_valid(true) {}
+ virtual ~__vector2list_info() {}
+ __vector2list_info(const __vector2list_info& __o);
+ void __merge(const __vector2list_info& __o);
+ void __write(FILE* __f) const;
+ float __magnitude() const { return _M_vector_cost - _M_list_cost; }
+ const char* __advice() const { return "change std::vector to std::list"; }
+
+ size_t __shift_count() { return _M_shift_count; }
+ size_t __iterate() { return _M_iterate; }
+ float __list_cost() { return _M_list_cost; }
+ size_t __resize() { return _M_resize; }
+ void __set_list_cost(float __lc) { _M_list_cost = __lc; }
+ void __set_vector_cost(float __vc) { _M_vector_cost = __vc; }
+ bool __is_valid() { return _M_valid; }
+ void __set_invalid() { _M_valid = false; }
+
+ void __opr_insert(size_t __pos, size_t __num);
+ void __opr_iterate(size_t __num) { _M_iterate += __num; }
+ void __resize(size_t __from, size_t __to);
+
+private:
+ size_t _M_shift_count;
+ size_t _M_iterate;
+ size_t _M_resize;
+ float _M_list_cost;
+ float _M_vector_cost;
+ bool _M_valid;
+};
+
+inline __vector2list_info::__vector2list_info(const __vector2list_info& __o)
+ : __object_info_base(__o)
+{
+ _M_shift_count = __o._M_shift_count;
+ _M_iterate = __o._M_iterate;
+ _M_vector_cost = __o._M_vector_cost;
+ _M_list_cost = __o._M_list_cost;
+ _M_valid = __o._M_valid;
+ _M_resize = __o._M_resize;
+}
+
+inline void __vector2list_info::__merge(const __vector2list_info& __o)
+{
+ _M_shift_count += __o._M_shift_count;
+ _M_iterate += __o._M_iterate;
+ _M_vector_cost += __o._M_vector_cost;
+ _M_list_cost += __o._M_list_cost;
+ _M_valid &= __o._M_valid;
+ _M_resize += __o._M_resize;
+}
+
+inline void __vector2list_info::__opr_insert(size_t __pos, size_t __num)
+{
+ _M_shift_count += __num - __pos;
+}
+
+inline void __vector2list_info::__resize(size_t __from, size_t __to)
+{
+ _M_resize += __from;
+}
+
+/** @brief A vector-to-list instrumentation line in the stack table. */
+class __vector2list_stack_info: public __vector2list_info {
+ public:
+ __vector2list_stack_info(const __vector2list_info& __o)
+ : __vector2list_info(__o) {}
+};
+
+/** @brief Vector-to-list instrumentation producer. */
+class __trace_vector_to_list
+ : public __trace_base<__vector2list_info, __vector2list_stack_info>
+{
+ public:
+ __trace_vector_to_list();
+ ~__trace_vector_to_list() {}
+
+ // Insert a new node at construct with object, callstack and initial size.
+ void __insert(__object_t __obj, __stack_t __stack);
+ // Call at destruction/clean to set container final size.
+ void __destruct(const void* __obj);
+
+ // Find the node in the live map.
+ __vector2list_info* __find(const void* __obj);
+
+ // Collect cost of operations.
+ void __opr_insert(const void* __obj, size_t __pos, size_t __num);
+ void __opr_iterate(const void* __obj, size_t __num);
+ void __invalid_operator(const void* __obj);
+ void __resize(const void* __obj, size_t __from, size_t __to);
+ float __vector_cost(size_t __shift, size_t __iterate, size_t __resize);
+ float __list_cost(size_t __shift, size_t __iterate, size_t __resize);
+};
+
+inline __trace_vector_to_list::__trace_vector_to_list()
+ : __trace_base<__vector2list_info, __vector2list_stack_info>()
+{
+ __id = "vector-to-list";
+}
+
+inline void __trace_vector_to_list::__insert(__object_t __obj,
+ __stack_t __stack)
+{
+ __add_object(__obj, __vector2list_info(__stack));
+}
+
+inline void __vector2list_info::__write(FILE* __f) const
+{
+ fprintf(__f, "%Zu %Zu %Zu %.0f %.0f\n",
+ _M_shift_count, _M_resize, _M_iterate, _M_vector_cost, _M_list_cost);
+}
+
+// Cost model. XXX: get this from the cost model database instead.
+// Vector operation cost:
+// - Cost per shift: 1
+// - Cost per access: 1
+// - Cost per resize: 1
+// List operation cost:
+// - Cost per shift: 0
+// - Cost per access: 10
+// - Cost per resize: 0
+
+inline float __trace_vector_to_list::__vector_cost(size_t __shift,
+ size_t __iterate,
+ size_t __resize)
+{
+ return __shift * 1 + __iterate * 1 + __resize * 1;
+}
+
+inline float __trace_vector_to_list::__list_cost(size_t __shift,
+ size_t __iterate,
+ size_t __resize)
+{
+ return __shift * 0 + __iterate * 10 + __resize * 0;
+}
+
+inline void __trace_vector_to_list::__destruct(const void* __obj)
+{
+ if (!__is_on())
+ return;
+
+ __vector2list_info* __res = __get_object_info(__obj);
+ if (!__res)
+ return;
+
+ float __vc = __vector_cost(__res->__shift_count(), __res->__iterate(),
+ __res->__resize());
+ float __lc = __list_cost(__res->__shift_count(), __res->__iterate(),
+ __res->__resize());
+ __res->__set_vector_cost(__vc);
+ __res->__set_list_cost(__lc);
+
+ __retire_object(__obj);
+}
+
+inline void __trace_vector_to_list::__opr_insert(const void* __obj,
+ size_t __pos, size_t __num)
+{
+ __vector2list_info* __res = __get_object_info(__obj);
+ if (__res)
+ __res->__opr_insert(__pos, __num);
+}
+
+inline void __trace_vector_to_list::__opr_iterate(const void* __obj,
+ size_t __num)
+{
+ __vector2list_info* __res = __get_object_info(__obj);
+ if (__res)
+ __res->__opr_iterate(__num);
+}
+
+inline void __trace_vector_to_list::__invalid_operator(const void* __obj)
+{
+ __vector2list_info* __res = __get_object_info(__obj);
+ if (__res)
+ __res->__set_invalid();
+}
+
+inline void __trace_vector_to_list::__resize(const void* __obj, size_t __from,
+ size_t __to)
+{
+ __vector2list_info* __res = __get_object_info(__obj);
+ if (__res)
+ __res->__resize(__from, __to);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Initialization and report.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_vector_to_list_init()
+{
+ __tables<0>::_S_vector_to_list = new __trace_vector_to_list();
+}
+
+inline void __trace_vector_to_list_report(FILE* __f,
+ __warning_vector_t& __warnings)
+{
+ if (__tables<0>::_S_vector_to_list) {
+ __tables<0>::_S_vector_to_list->__collect_warnings(__warnings);
+ __tables<0>::_S_vector_to_list->__write(__f);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Implementations of instrumentation hooks.
+//////////////////////////////////////////////////////////////////////////////
+
+inline void __trace_vector_to_list_construct(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__insert(__obj, __get_stack());
+}
+
+inline void __trace_vector_to_list_destruct(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__destruct(__obj);
+}
+
+inline void __trace_vector_to_list_insert(const void* __obj,
+ size_t __pos, size_t __num)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__opr_insert(__obj, __pos, __num);
+}
+
+
+inline void __trace_vector_to_list_iterate(const void* __obj, size_t __num)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__opr_iterate(__obj, __num);
+}
+
+inline void __trace_vector_to_list_invalid_operator(const void* __obj)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__invalid_operator(__obj);
+}
+
+inline void __trace_vector_to_list_resize(const void* __obj,
+ size_t __from, size_t __to)
+{
+ if (!__profcxx_init()) return;
+
+ __tables<0>::_S_vector_to_list->__resize(__obj, __from, __to);
+}
+
+} // namespace __cxxprof_impl
+#endif /* PROFCXX_PROFILER_VECTOR_TO_LIST_H__ */
diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list
new file mode 100644
index 00000000000..061c5065826
--- /dev/null
+++ b/libstdc++-v3/include/profile/list
@@ -0,0 +1,520 @@
+// Profiling list implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/list
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_LIST
+#define _GLIBCXX_PROFILE_LIST 1
+
+#include <list>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief List wrapper with performance instrumentation. */
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class list
+ : public _GLIBCXX_STD_D::list<_Tp, _Allocator>
+ {
+ typedef _GLIBCXX_STD_D::list<_Tp, _Allocator> _Base;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.2.1 construct/copy/destroy:
+ explicit list(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit list(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __a)
+ { }
+
+
+ list(const list& __x)
+ : _Base(__x) { }
+
+ list(const _Base& __x)
+ : _Base(__x) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list(list&& __x)
+ : _Base(std::forward<list>(__x))
+ { }
+
+ list(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a) { }
+#endif
+
+ ~list() { }
+
+ list&
+ operator=(const list& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list&
+ operator=(list&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ list&
+ operator=(initializer_list<value_type> __l)
+ {
+ static_cast<_Base&>(*this) = __l;
+ return *this;
+ }
+
+ void
+ assign(initializer_list<value_type> __l)
+ {
+ _Base::assign(__l);
+ }
+#endif
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ _Base::assign(__first, __last);
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin()); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin()); }
+
+ iterator
+ end()
+ { return iterator(_Base::end()); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end()); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // 23.2.2.2 capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ _Base::resize(__sz, __c);
+ }
+
+ // element access:
+ reference
+ front()
+ {
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ return _Base::back();
+ }
+
+ // 23.2.2.3 modifiers:
+ using _Base::push_front;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using _Base::emplace_front;
+#endif
+
+ void
+ pop_front()
+ {
+ iterator __victim = begin();
+ _Base::pop_front();
+ }
+
+ using _Base::push_back;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using _Base::emplace_back;
+#endif
+
+ void
+ pop_back()
+ {
+ iterator __victim = end();
+ --__victim;
+ _Base::pop_back();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ return iterator(_Base::emplace(__position,
+ std::forward<_Args>(__args)...));
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ return iterator(_Base::insert(__position, __x));
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ {
+ _Base::insert(__p, __l);
+ }
+#endif
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ _Base::insert(__position, __n, __x);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ _Base::insert(__position, __first, __last);
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ return iterator(_Base::erase(__position));
+ }
+
+ iterator
+ erase(iterator __position, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ return iterator(_Base::erase(__position, __last));
+ }
+
+ void
+ swap(list& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ }
+
+ // 23.2.2.4 list operations:
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x)
+#else
+ splice(iterator __position, list& __x)
+#endif
+ {
+ this->splice(__position, _GLIBCXX_MOVE(__x), __x.begin(), __x.end());
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __i)
+#else
+ splice(iterator __position, list& __x, iterator __i)
+#endif
+ {
+ // We used to perform the splice_alloc check: not anymore, redundant
+ // after implementing the relevant bits of N1599.
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ _Base::splice(__position, _GLIBCXX_MOVE(__x._M_base()),
+ __i);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __first,
+ iterator __last)
+#else
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+#endif
+ {
+ // We used to perform the splice_alloc check: not anymore, redundant
+ // after implementing the relevant bits of N1599.
+
+ _Base::splice(__position, _GLIBCXX_MOVE(__x._M_base()),
+ __first, __last);
+ }
+
+ void
+ remove(const _Tp& __value)
+ {
+ for (iterator __x = begin(); __x != _Base::end(); )
+ {
+ if (*__x == __value)
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ template<class _Predicate>
+ void
+ remove_if(_Predicate __pred)
+ {
+ for (iterator __x = begin(); __x != _Base::end(); )
+ {
+ if (__pred(*__x))
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ void
+ unique()
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (*__first == *__next)
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<class _BinaryPredicate>
+ void
+ unique(_BinaryPredicate __binary_pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x)
+#else
+ merge(list& __x)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ _Base::merge(_GLIBCXX_MOVE(__x._M_base()));
+ }
+ }
+
+ template<class _Compare>
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x, _Compare __comp)
+#else
+ merge(list& __x, _Compare __comp)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ _Base::merge(_GLIBCXX_MOVE(__x._M_base()), __comp);
+ }
+ }
+
+ void
+ sort() { _Base::sort(); }
+
+ template<typename _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering __pred) { _Base::sort(__pred); }
+
+ using _Base::reverse;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/map b/libstdc++-v3/include/profile/map
new file mode 100644
index 00000000000..e396b852398
--- /dev/null
+++ b/libstdc++-v3/include/profile/map
@@ -0,0 +1,41 @@
+// Profiling map/multimap implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/map
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_MAP
+#define _GLIBCXX_PROFILE_MAP 1
+
+#include <map>
+#include <profile/map.h>
+#include <profile/multimap.h>
+
+#endif
diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h
new file mode 100644
index 00000000000..aa9e535a1e4
--- /dev/null
+++ b/libstdc++-v3/include/profile/map.h
@@ -0,0 +1,489 @@
+// Profiling map implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/map.h
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_MAP_H
+#define _GLIBCXX_PROFILE_MAP_H 1
+
+#include <utility>
+#include <profile/base.h>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Map wrapper with performance instrumentation. */
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class map
+ : public _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator>
+ {
+ typedef _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> _Base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ 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 std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit map(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) {
+ __profcxx_map_to_unordered_map_construct(this);
+ }
+
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __comp, __a) {
+ __profcxx_map_to_unordered_map_construct(this);
+ }
+
+ map(const map& __x)
+ : _Base(__x) {
+ __profcxx_map_to_unordered_map_construct(this);
+ }
+
+ map(const _Base& __x)
+ : _Base(__x) {
+ __profcxx_map_to_unordered_map_construct(this);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map(map&& __x)
+ : _Base(std::forward<map>(__x))
+ { }
+
+ map(initializer_list<value_type> __l,
+ const _Compare& __c = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __c, __a) { }
+#endif
+
+ ~map() {
+ __profcxx_map_to_unordered_map_destruct(this);
+ }
+
+ map&
+ operator=(const map& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map&
+ operator=(map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 133. map missing get_allocator()
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return _Base::begin(); }
+
+ const_iterator
+ begin() const
+ { return _Base::begin(); }
+
+ iterator
+ end()
+ { return _Base::end(); }
+
+ const_iterator
+ end() const
+ { return _Base::end(); }
+
+ reverse_iterator
+ rbegin()
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return reverse_iterator(end());
+ }
+
+ const_reverse_iterator
+ rbegin() const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_reverse_iterator(end());
+ }
+
+ reverse_iterator
+ rend()
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return reverse_iterator(begin());
+ }
+
+ const_reverse_iterator
+ rend() const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_reverse_iterator(begin());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_reverse_iterator(end());
+ }
+
+ const_reverse_iterator
+ crend() const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_reverse_iterator(begin());
+ }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // 23.3.1.2 element access:
+ mapped_type&
+ operator[](const key_type& __k)
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return _Base::operator[](__k);
+ }
+
+ mapped_type&
+ at(const key_type& __k)
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return _Base::at(__k);
+ }
+
+ const mapped_type&
+ at(const key_type& __k) const
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return _Base::at(__k);
+ }
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ __profcxx_map_to_unordered_map_insert(this, size(), 1);
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first),
+ __res.second);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(std::initializer_list<value_type> __list)
+ {
+ size_type size_before = size();
+ _Base::insert(__list);
+ __profcxx_map_to_unordered_map_insert(this, size_before,
+ size() - size_before);
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ size_type size_before = size();
+ return iterator(_Base::insert(__position, __x));
+ __profcxx_map_to_unordered_map_insert(this, size_before,
+ size() - size_before);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ size_type size_before = size();
+ _Base::insert(__first, __last);
+ __profcxx_map_to_unordered_map_insert(this, size_before,
+ size() - size_before);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ iterator __i = _Base::erase(__position);
+ __profcxx_map_to_unordered_map_erase(this, size(), 1);
+ return __i;
+ }
+#else
+ void
+ erase(iterator __position)
+ {
+ _Base::erase(__position);
+ __profcxx_map_to_unordered_map_erase(this, size(), 1);
+ }
+#endif
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ _Base::erase(__victim);
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+
+ swap(map& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 map operations:
+ iterator
+ find(const key_type& __x)
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return iterator(_Base::find(__x));
+ }
+
+ const_iterator
+ find(const key_type& __x) const
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return const_iterator(_Base::find(__x));
+ }
+
+ size_type
+ count(const key_type& __x) const
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ return _Base::count(__x);
+ }
+
+ iterator
+ lower_bound(const key_type& __x)
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return iterator(_Base::lower_bound(__x));
+ }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_iterator(_Base::lower_bound(__x));
+ }
+
+ iterator
+ upper_bound(const key_type& __x)
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return iterator(_Base::upper_bound(__x));
+ }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ {
+ __profcxx_map_to_unordered_map_invalidate(this);
+ return const_iterator(_Base::upper_bound(__x));
+ }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first),
+ iterator(__res.second));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ __profcxx_map_to_unordered_map_find(this, size());
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first),
+ const_iterator(__res.second));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ };
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() == __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() != __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() < __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() <= __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() >= __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ {
+ __profcxx_map_to_unordered_map_invalidate(&__lhs);
+ __profcxx_map_to_unordered_map_invalidate(&__rhs);
+ return __lhs._M_base() > __rhs._M_base();
+ }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h
new file mode 100644
index 00000000000..b1fc70b63b2
--- /dev/null
+++ b/libstdc++-v3/include/profile/multimap.h
@@ -0,0 +1,363 @@
+// Profiling multimap implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/multimap.h
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_MULTIMAP_H
+#define _GLIBCXX_PROFILE_MULTIMAP_H 1
+
+#include <utility>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Multimap wrapper with performance instrumentation. */
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class multimap
+ : public _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator>
+ {
+ typedef _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> _Base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef typename _Base::reverse_iterator reverse_iterator;
+ typedef typename _Base::const_reverse_iterator const_reverse_iterator;
+
+ 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;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit multimap(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __comp, __a) { }
+
+ multimap(const multimap& __x)
+ : _Base(__x) { }
+
+ multimap(const _Base& __x)
+ : _Base(__x) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap(multimap&& __x)
+ : _Base(std::forward<multimap>(__x))
+ { }
+
+ multimap(initializer_list<value_type> __l,
+ const _Compare& __c = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __c, __a) { }
+#endif
+
+ ~multimap() { }
+
+ multimap&
+ operator=(const multimap& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap&
+ operator=(multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin()); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin()); }
+
+ iterator
+ end()
+ { return iterator(_Base::end()); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end()); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x)); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(std::initializer_list<value_type> __list)
+ { _Base::insert(__list); }
+#endif
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ return iterator(_Base::insert(__position, __x));
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ _Base::insert(__first, __last);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
+ void
+ erase(iterator __position)
+ {
+ _Base::erase(__position);
+ }
+#endif
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ _Base::erase(__victim);
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(multimap& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 multimap operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x)); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x)); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x)); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x)); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x)); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x)); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first),
+ iterator(__res.second));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first),
+ const_iterator(__res.second));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h
new file mode 100644
index 00000000000..759761bd52c
--- /dev/null
+++ b/libstdc++-v3/include/profile/multiset.h
@@ -0,0 +1,363 @@
+// Profiling multiset implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/multiset.h
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_MULTISET_H
+#define _GLIBCXX_PROFILE_MULTISET_H 1
+
+#include <utility>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Multiset wrapper with performance instrumentation. */
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class multiset
+ : public _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator>
+ {
+ typedef _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> _Base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef typename _Base::reverse_iterator reverse_iterator;
+ typedef typename _Base::const_reverse_iterator const_reverse_iterator;
+
+ 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;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit multiset(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __comp, __a) { }
+
+ multiset(const multiset& __x)
+ : _Base(__x) { }
+
+ multiset(const _Base& __x)
+ : _Base(__x) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset(multiset&& __x)
+ : _Base(std::forward<multiset>(__x))
+ { }
+
+ multiset(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __comp, __a) { }
+#endif
+
+ ~multiset() { }
+
+ multiset&
+ operator=(const multiset& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset&
+ operator=(multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin()); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin()); }
+
+ iterator
+ end()
+ { return iterator(_Base::end()); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end()); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x)); }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ return iterator(_Base::insert(__position, __x));
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ _Base::insert(__first, __last);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
+ void
+ erase(iterator __position)
+ {
+ _Base::erase(__position);
+ }
+#endif
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ _Base::erase(__victim);
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(multiset& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // multiset operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x)); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x)); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x)); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first),
+ iterator(__res.second));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first),
+ const_iterator(__res.second));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>& __x,
+ multiset<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/set b/libstdc++-v3/include/profile/set
new file mode 100644
index 00000000000..11603a84858
--- /dev/null
+++ b/libstdc++-v3/include/profile/set
@@ -0,0 +1,41 @@
+// Profiling set/multiset implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/set
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_SET
+#define _GLIBCXX_PROFILE_SET 1
+
+#include <set>
+#include <profile/set.h>
+#include <profile/multiset.h>
+
+#endif
diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h
new file mode 100644
index 00000000000..50fb16faf37
--- /dev/null
+++ b/libstdc++-v3/include/profile/set.h
@@ -0,0 +1,367 @@
+// Profiling set implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file profile/set.h
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_SET_H
+#define _GLIBCXX_PROFILE_SET_H 1
+
+#include <utility>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Set wrapper with performance instrumentation. */
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class set
+ : public _GLIBCXX_STD_D::set<_Key,_Compare,_Allocator>
+ {
+ typedef _GLIBCXX_STD_D::set<_Key, _Compare, _Allocator> _Base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef typename _Base::reverse_iterator reverse_iterator;
+ typedef typename _Base::const_reverse_iterator const_reverse_iterator;
+
+ 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;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit set(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __comp, __a) { }
+
+ set(const set& __x)
+ : _Base(__x) { }
+
+ set(const _Base& __x)
+ : _Base(__x) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set(set&& __x)
+ : _Base(std::forward<set>(__x))
+ { }
+
+ set(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __comp, __a) { }
+#endif
+
+ ~set() { }
+
+ set&
+ operator=(const set& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set&
+ operator=(set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin()); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin()); }
+
+ iterator
+ end()
+ { return iterator(_Base::end()); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end()); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin()); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end()); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first),
+ __res.second);
+ }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ return iterator(_Base::insert(__position, __x));
+ }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ _Base::insert(__first, __last);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
+ void
+ erase(iterator __position)
+ {
+ _Base::erase(__position);
+ }
+#endif
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ _Base::erase(__victim);
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+ swap(set& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // set operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x)); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x)); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x)); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first),
+ iterator(__res.second));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first),
+ const_iterator(__res.second));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>& __x,
+ set<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+} // namespace __profile
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map
new file mode 100644
index 00000000000..d1cb9217d23
--- /dev/null
+++ b/libstdc++-v3/include/profile/unordered_map
@@ -0,0 +1,498 @@
+// Profiling unordered_map/unordered_multimap implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/unordered_map
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_UNORDERED_MAP
+#define _GLIBCXX_PROFILE_UNORDERED_MAP 1
+
+#include <profile/base.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_map>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <initializer_list>
+
+#define _GLIBCXX_BASE unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Unordered_map wrapper with performance instrumentation. */
+ 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 _GLIBCXX_STD_BASE
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ 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::reference reference;
+ typedef typename _Base::const_reference const_reference;
+ typedef typename _Base::mapped_type mapped_type;
+ typedef std::pair<typename _Base::iterator, bool> pair_type;
+ typedef typename _Base::insert_return_type insert_return_type;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ explicit
+ unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ 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())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_map(const _Base& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_map(unordered_map&& __x)
+ : _Base(std::forward<_Base>(__x))
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a) { }
+
+ unordered_map&
+ operator=(const unordered_map& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+ unordered_map&
+ operator=(unordered_map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ ~unordered_map()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ _M_profile_destruct();
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+
+ void
+ clear()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ _M_profile_destruct();
+ _Base::clear();
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__l);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ insert_return_type
+ insert(const value_type& __obj)
+ {
+ size_type __old_size = _Base::bucket_count();
+ insert_return_type __res = _Base::insert(__obj);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+ iterator
+ insert(iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ iterator res = _Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ const_iterator
+ insert(const_iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ const_iterator res =_Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ template<typename _InputIter>
+ void
+ insert(_InputIter __first, _InputIter __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first.base(), __last.base());
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void
+ insert(const value_type* __first, const value_type* __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ // operator []
+ mapped_type&
+ operator[](const _Key& _k)
+ {
+ size_type __old_size = _Base::bucket_count();
+ mapped_type& __res = _M_base()[_k];
+ size_type __new_size = _Base::bucket_count();
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+
+ void
+ swap(unordered_map& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void rehash(size_type __n)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::rehash(__n);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ private:
+ void _M_profile_resize(size_type __old_size, size_type __new_size)
+ {
+ if (__old_size != __new_size)
+ {
+ __profcxx_hashtable_resize(this, __old_size, __new_size);
+ }
+ }
+ void _M_profile_destruct()
+ {
+ size_type __hops = 0, __lc = 0, __chain = 0;
+ for (iterator it = _M_base().begin(); it != _M_base().end(); it++)
+ {
+ while (it._M_cur_node->_M_next) {
+ __chain++;
+ it++;
+ }
+ if (__chain) {
+ __chain++;
+ __lc = __lc > __chain ? __lc : __chain;
+ __hops += __chain * (__chain - 1) / 2;
+ __chain = 0;
+ }
+ }
+ __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops);
+ }
+ };
+ 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_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE
+
+ /** @brief Unordered_multimap wrapper with performance instrumentation. */
+ 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 _GLIBCXX_STD_BASE
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ 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::reference reference;
+ typedef typename _Base::const_reference const_reference;
+ typedef std::pair<typename _Base::iterator, bool> pair_type;
+ typedef typename _Base::insert_return_type insert_return_type;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ explicit
+ unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+ 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())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multimap(const _Base& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multimap(unordered_multimap&& __x)
+ : _Base(std::forward<_Base>(__x))
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a) { }
+
+ unordered_multimap&
+ operator=(const unordered_multimap& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+ unordered_multimap&
+ operator=(unordered_multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ ~unordered_multimap()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ _M_profile_destruct();
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+
+ void
+ clear()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ _M_profile_destruct();
+ _Base::clear();
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__l);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ insert_return_type
+ insert(const value_type& __obj)
+ {
+ size_type __old_size = _Base::bucket_count();
+ insert_return_type __res = _Base::insert(__obj);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+ iterator
+ insert(iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ iterator res = _Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ const_iterator
+ insert(const_iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ const_iterator res =_Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ template<typename _InputIter>
+ void
+ insert(_InputIter __first, _InputIter __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first.base(), __last.base());
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void
+ insert(const value_type* __first, const value_type* __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void
+ swap(unordered_multimap& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void rehash(size_type __n)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::rehash(__n);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ private:
+ void _M_profile_resize(size_type __old_size, size_type __new_size)
+ {
+ if (__old_size != __new_size)
+ {
+ __profcxx_hashtable_resize(this, __old_size, __new_size);
+ }
+ }
+
+ void _M_profile_destruct()
+ {
+ size_type __hops = 0, __lc = 0, __chain = 0;
+ for (iterator it = _M_base().begin(); it != _M_base().end(); it++)
+ {
+ while (it._M_cur_node->_M_next) {
+ __chain++;
+ it++;
+ }
+ if (__chain) {
+ __chain++;
+ __lc = __lc > __chain ? __lc : __chain;
+ __hops += __chain * (__chain - 1) / 2;
+ __chain = 0;
+ }
+ }
+ __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops);
+ }
+
+ };
+ 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 __profile
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set
new file mode 100644
index 00000000000..6c2dd77cb5f
--- /dev/null
+++ b/libstdc++-v3/include/profile/unordered_set
@@ -0,0 +1,480 @@
+// Profiling unordered_set/unordered_multiset implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/unordered_set
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_UNORDERED_SET
+#define _GLIBCXX_PROFILE_UNORDERED_SET 1
+
+#include <profile/base.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_set>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <initializer_list>
+
+#define _GLIBCXX_BASE unordered_set<_Key, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Unordered_set wrapper with performance instrumentation. */
+ template<typename _Key,
+ typename _Hash = std::hash<_Key>,
+ typename _Pred = std::equal_to<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class unordered_set
+ : public _GLIBCXX_STD_BASE
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ 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::reference reference;
+ typedef typename _Base::const_reference const_reference;
+ typedef typename _Base::insert_return_type insert_return_type;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ explicit
+ unordered_set(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ 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())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_set(const _Base& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_set(unordered_set&& __x)
+ : _Base(std::forward<_Base>(__x))
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a) { }
+
+ unordered_set&
+ operator=(const unordered_set& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+ unordered_set&
+ operator=(unordered_set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ ~unordered_set()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
+ _M_profile_destruct();
+ }
+
+ void
+ swap(unordered_set& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
+ _M_profile_destruct();
+ _Base::clear();
+ }
+ void
+ insert(std::initializer_list<value_type> __l)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__l);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ insert_return_type insert(const value_type& __obj)
+ {
+ size_type __old_size = _Base::bucket_count();
+ insert_return_type __res = _Base::insert(__obj);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+ iterator
+ insert(iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ iterator res = _Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ const_iterator
+ insert(const_iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ const_iterator res =_Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ template<typename _InputIter>
+ void
+ insert(_InputIter __first, _InputIter __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void
+ insert(const value_type* __first, const value_type* __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void rehash(size_type __n)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::rehash(__n);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ private:
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ void _M_profile_resize(size_type __old_size, size_type __new_size)
+ {
+ if (__old_size != __new_size)
+ {
+ __profcxx_hashtable_resize(this, __old_size, __new_size);
+ }
+ }
+ void _M_profile_destruct()
+ {
+ size_type __hops = 0, __lc = 0, __chain = 0;
+ for (iterator it = _M_base().begin(); it != _M_base().end(); it++)
+ {
+ while (it._M_cur_node->_M_next) {
+ __chain++;
+ it++;
+ }
+ if (__chain) {
+ __chain++;
+ __lc = __lc > __chain ? __lc : __chain;
+ __hops += __chain * (__chain - 1) / 2;
+ __chain = 0;
+ }
+ }
+ __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops);
+ }
+
+ };
+ 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_PR::_GLIBCXX_BASE
+#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
+
+ /** @brief Unordered_multiset wrapper with performance instrumentation. */
+ template<typename _Value,
+ typename _Hash = std::hash<_Value>,
+ typename _Pred = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class unordered_multiset
+ : public _GLIBCXX_STD_BASE
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ 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::reference reference;
+ typedef typename _Base::const_reference const_reference;
+ typedef typename _Base::insert_return_type insert_return_type;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ explicit
+ unordered_multiset(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ 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())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multiset(const _Base& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multiset(unordered_multiset&& __x)
+ : _Base(std::forward<_Base>(__x))
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a) { }
+
+ unordered_multiset&
+ operator=(const unordered_multiset& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ return *this;
+ }
+
+ unordered_multiset&
+ operator=(unordered_multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ ~unordered_multiset()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
+ _M_profile_destruct();
+ }
+
+ void
+ swap(unordered_multiset& __x)
+ {
+ _Base::swap(__x);
+ }
+
+ void
+ clear()
+ {
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
+ _M_profile_destruct();
+ _Base::clear();
+ }
+ void
+ insert(std::initializer_list<value_type> __l)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__l);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ insert_return_type insert(const value_type& __obj)
+ {
+ size_type __old_size = _Base::bucket_count();
+ insert_return_type __res = _Base::insert(__obj);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+ iterator
+ insert(iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ iterator res = _Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ const_iterator
+ insert(const_iterator __iter, const value_type& __v)
+ {
+ size_type __old_size = _Base::bucket_count();
+ const_iterator res =_Base::insert(__iter, __v);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return res;
+ }
+
+ template<typename _InputIter>
+ void
+ insert(_InputIter __first, _InputIter __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void
+ insert(const value_type* __first, const value_type* __last)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::insert(__first, __last);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+
+ void rehash(size_type __n)
+ {
+ size_type __old_size = _Base::bucket_count();
+ _Base::rehash(__n);
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ }
+ private:
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ void _M_profile_resize(size_type __old_size, size_type __new_size)
+ {
+ if (__old_size != __new_size)
+ {
+ __profcxx_hashtable_resize(this, __old_size, __new_size);
+ }
+ }
+
+ void _M_profile_destruct()
+ {
+ size_type __hops = 0, __lc = 0, __chain = 0;
+ for (iterator it = _M_base().begin(); it != _M_base().end(); it++)
+ {
+ while (it._M_cur_node->_M_next) {
+ __chain++;
+ it++;
+ }
+ if (__chain) {
+ __chain++;
+ __lc = __lc > __chain ? __lc : __chain;
+ __hops += __chain * (__chain - 1) / 2;
+ __chain = 0;
+ }
+ }
+ __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops);
+ }
+
+ };
+ 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 __profile
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector
new file mode 100644
index 00000000000..e6aeb686a7a
--- /dev/null
+++ b/libstdc++-v3/include/profile/vector
@@ -0,0 +1,369 @@
+// Profiling vector implementation -*- C++ -*-
+
+// Copyright (C) 2009 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 profile/vector
+ * This file is a GNU profile extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PROFILE_VECTOR
+#define _GLIBCXX_PROFILE_VECTOR 1
+
+#include <vector>
+#include <utility>
+#include <profile/base.h>
+
+namespace std
+{
+namespace __profile
+{
+ /** @brief Vector wrapper with performance instrumentation. */
+ template<typename _Tp,
+ typename _Allocator = std::allocator<_Tp> >
+ class vector
+ : public _GLIBCXX_STD_PR::vector<_Tp, _Allocator>
+ {
+ typedef _GLIBCXX_STD_PR::vector<_Tp, _Allocator> _Base;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ // 23.2.4.1 construct/copy/destroy:
+ explicit vector(const _Allocator& __a = _Allocator())
+ : _Base(__a)
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+ explicit vector(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a)
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+ template<class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__first, __last, __a)
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+ vector(const vector& __x)
+ : _Base(__x)
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+ /// Construction from a release-mode vector
+ vector(const _Base& __x)
+ : _Base(__x)
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector(vector&& __x)
+ : _Base(std::forward<vector>(__x))
+ {
+ __profcxx_vector_construct(this, this->capacity());
+ __profcxx_vector_construct2(this);
+ }
+
+ vector(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a) { }
+#endif
+
+ ~vector() {
+ __profcxx_vector_destruct(this, this->capacity(), this->size());
+ __profcxx_vector_destruct2(this);
+ }
+
+ vector&
+ operator=(const vector& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ vector&
+ operator=(initializer_list<value_type> __l)
+ {
+ static_cast<_Base&>(*this) = __l;
+ return *this;
+ }
+#endif
+
+ using _Base::assign;
+ using _Base::get_allocator;
+
+ // 23.2.4.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ __profcxx_vector_invalid_operator(this);
+ _M_profile_resize(this, this->capacity(), __sz);
+ _Base::resize(__sz, __c);
+ }
+
+ using _Base::empty;
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ __profcxx_vector_invalid_operator(this);
+ return _M_base()[__n];
+ }
+ const_reference
+ operator[](size_type __n) const
+ {
+ __profcxx_vector_invalid_operator(this);
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ return _Base::back();
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ using _Base::data;
+
+ // 23.2.4.3 modifiers:
+ void
+ push_back(const _Tp& __x)
+ {
+ size_type __old_size = this->capacity();
+ _Base::push_back(__x);
+ _M_profile_resize(this, __old_size, this->capacity());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_back(_Tp&& __x)
+ {
+ size_type __old_size = this->capacity();
+ _Base::push_back(__x);
+ _M_profile_resize(this, __old_size, this->capacity());
+ }
+
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __profcxx_vector_insert(this, __position-_Base::begin(), this->size());
+ size_type __old_size = this->capacity();
+ typename _Base::iterator __res = _Base::insert(__position,__x);
+ _M_profile_resize(this, __old_size, this->capacity());
+ return __res;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ {
+ __profcxx_vector_insert(this, __position-_Base::begin(), this->size());
+ size_type __old_size = this->capacity();
+ typename _Base::iterator __res = _Base::insert(__position,__x);
+ _M_profile_resize(this, __old_size, this->capacity());
+ return __res;
+ }
+
+ void
+ insert(iterator __position, initializer_list<value_type> __l)
+ { this->insert(__position, __l.begin(), __l.end()); }
+#endif
+
+ void
+
+ swap(vector& __x)
+ {
+ _Base::swap(__x);
+ }
+
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __profcxx_vector_insert(this, __position-_Base::begin(), this->size());
+ size_type __old_size = this->capacity();
+ _Base::insert(__position, __n, __x);
+ _M_profile_resize(this, __old_size, this->capacity());
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ __profcxx_vector_insert(this, __position-_Base::begin(), this->size());
+ size_type __old_size = this->capacity();
+ _Base::insert(__position, __first, __last);
+ _M_profile_resize(this, __old_size, this->capacity());
+ }
+
+ void
+ clear()
+ {
+ __profcxx_vector_destruct(this, this->capacity(), this->size());
+ __profcxx_vector_destruct2(this);
+ _Base::clear();
+ }
+
+ // iterators:
+ iterator
+ begin()
+ {
+ return _Base::begin();
+ }
+
+ const_iterator
+ begin() const
+ {
+ return _Base::begin();
+ }
+
+ private:
+ void _M_profile_resize(void* obj, size_type __old_size,
+ size_type __new_size)
+ {
+ if (__old_size < __new_size) {
+ __profcxx_vector_resize(this, this->size(), __new_size);
+ __profcxx_vector_resize2(this, this->size(), __new_size);
+ }
+ }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+} // namespace __profile
+ using _GLIBCXX_STD_D::_S_word_bit;
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
index 5ca442989aa..131fe56de2d 100644
--- a/libstdc++-v3/include/std/bitset
+++ b/libstdc++-v3/include/std/bitset
@@ -1393,4 +1393,8 @@ _GLIBCXX_END_NESTED_NAMESPACE
# include <debug/bitset>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/bitset>
+#endif
+
#endif /* _GLIBCXX_BITSET */
diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque
index 8f64b005ccf..f8a55f72165 100644
--- a/libstdc++-v3/include/std/deque
+++ b/libstdc++-v3/include/std/deque
@@ -72,4 +72,8 @@
# include <debug/deque>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/deque>
+#endif
+
#endif /* _GLIBCXX_DEQUE */
diff --git a/libstdc++-v3/include/std/list b/libstdc++-v3/include/std/list
index d199802d736..fcf164b4bd5 100644
--- a/libstdc++-v3/include/std/list
+++ b/libstdc++-v3/include/std/list
@@ -70,5 +70,9 @@
# include <debug/list>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/list>
+#endif
+
#endif /* _GLIBCXX_LIST */
diff --git a/libstdc++-v3/include/std/map b/libstdc++-v3/include/std/map
index 159bfb3d040..25f86df6976 100644
--- a/libstdc++-v3/include/std/map
+++ b/libstdc++-v3/include/std/map
@@ -65,4 +65,8 @@
# include <debug/map>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/map>
+#endif
+
#endif /* _GLIBCXX_MAP */
diff --git a/libstdc++-v3/include/std/set b/libstdc++-v3/include/std/set
index 21e3f5a8a1e..0b7805cabec 100644
--- a/libstdc++-v3/include/std/set
+++ b/libstdc++-v3/include/std/set
@@ -65,4 +65,8 @@
# include <debug/set>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/set>
+#endif
+
#endif /* _GLIBCXX_SET */
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 18cd89bca3b..1c46852a8fa 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -174,8 +174,7 @@ namespace std
template<typename... _UElements>
_Tuple_impl(_Tuple_impl<_Idx, _UElements...>&& __in)
: _Inherited(std::move(__in._M_tail())),
- _Base(std::forward<typename _Tuple_impl<_Idx, _UElements...>::
- _Base>(__in._M_head())) { }
+ _Base(std::move(__in._M_head())) { }
_Tuple_impl&
operator=(const _Tuple_impl& __in)
diff --git a/libstdc++-v3/include/std/unordered_map b/libstdc++-v3/include/std/unordered_map
index 56906d28b5f..f8cd5459787 100644
--- a/libstdc++-v3/include/std/unordered_map
+++ b/libstdc++-v3/include/std/unordered_map
@@ -53,7 +53,7 @@
# include <tr1_impl/unordered_map>
#else
# define _GLIBCXX_INCLUDE_AS_CXX0X
-#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PROFILE)
# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
# define _GLIBCXX_END_NAMESPACE_TR1 }
# define _GLIBCXX_TR1 _GLIBCXX_STD_D
@@ -73,6 +73,10 @@
# include <debug/unordered_map>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/unordered_map>
+#endif
+
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif // _GLIBCXX_UNORDERED_MAP
diff --git a/libstdc++-v3/include/std/unordered_set b/libstdc++-v3/include/std/unordered_set
index 880f3bef4ec..b5b4f108980 100644
--- a/libstdc++-v3/include/std/unordered_set
+++ b/libstdc++-v3/include/std/unordered_set
@@ -53,7 +53,7 @@
# include <tr1_impl/unordered_set>
#else
# define _GLIBCXX_INCLUDE_AS_CXX0X
-#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PROFILE)
# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
# define _GLIBCXX_END_NAMESPACE_TR1 }
# define _GLIBCXX_TR1 _GLIBCXX_STD_D
@@ -73,6 +73,9 @@
# include <debug/unordered_set>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/unordered_set>
+#endif
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif // _GLIBCXX_UNORDERED_SET
diff --git a/libstdc++-v3/include/std/vector b/libstdc++-v3/include/std/vector
index 114665b6c96..41ecdde6c7b 100644
--- a/libstdc++-v3/include/std/vector
+++ b/libstdc++-v3/include/std/vector
@@ -34,7 +34,7 @@
* 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.
+ ded "as is" without express or implied warranty.
*
*
* Copyright (c) 1996
@@ -73,5 +73,9 @@
# include <debug/vector>
#endif
+#ifdef _GLIBCXX_PROFILE
+# include <profile/vector>
+#endif
+
#endif /* _GLIBCXX_VECTOR */
diff --git a/libstdc++-v3/include/tr1_impl/hashtable b/libstdc++-v3/include/tr1_impl/hashtable
index bce550ff1f1..c4776982334 100644
--- a/libstdc++-v3/include/tr1_impl/hashtable
+++ b/libstdc++-v3/include/tr1_impl/hashtable
@@ -409,6 +409,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_M_erase_node(_Node*, _Node**);
public:
+ // Expose insert_return_type for profiling mode.
+ typedef _Insert_Return_Type insert_return_type;
+
// Insert and erase
_Insert_Return_Type
insert(const value_type& __v)
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index be7dec69ab7..26dbf0da1ec 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, 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.
-//
+//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
@@ -38,7 +38,7 @@
extern "C++" {
-namespace std
+namespace std
{
/**
* @defgroup exceptions Exceptions
@@ -56,7 +56,7 @@ namespace std
* your own %exception classes, or use a different hierarchy, or to
* throw non-class data (e.g., fundamental types).
*/
- class exception
+ class exception
{
public:
exception() throw() { }
@@ -69,7 +69,7 @@ namespace std
/** If an %exception is thrown which is not listed in a function's
* %exception specification, one of these may be thrown. */
- class bad_exception : public exception
+ class bad_exception : public exception
{
public:
bad_exception() throw() { }
@@ -119,10 +119,10 @@ namespace std
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
- /**
+ /**
* @brief A replacement for the standard terminate_handler which
* prints more information about the terminating exception (if any)
- * on stderr.
+ * on stderr.
*
* @ingroup exceptions
*
@@ -138,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void __verbose_terminate_handler();
_GLIBCXX_END_NAMESPACE
-
+
} // extern "C++"
#pragma GCC visibility pop
diff --git a/libstdc++-v3/scripts/create_testsuite_files b/libstdc++-v3/scripts/create_testsuite_files
index edb9e4a2ce8..f4a0bcd80e0 100755
--- a/libstdc++-v3/scripts/create_testsuite_files
+++ b/libstdc++-v3/scripts/create_testsuite_files
@@ -32,7 +32,7 @@ cd $srcdir
# This is the ugly version of "everything but the current directory". It's
# what has to happen when find(1) doesn't support -mindepth, or -xtype.
dlist=`echo [0-9][0-9]*`
-dlist="$dlist abi backward ext performance tr1"
+dlist="$dlist abi backward ext performance tr1 decimal"
find $dlist "(" -type f -o -type l ")" -name "*.cc" -print > $tmp.01
find $dlist "(" -type f -o -type l ")" -name "*.c" -print > $tmp.02
cat $tmp.01 $tmp.02 | sort > $tmp.1
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/41530.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/41530.cc
new file mode 100644
index 00000000000..6bd405c093b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cons/41530.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// Tuple
+
+#include <tuple>
+
+class A {};
+class B : public A {};
+
+// PR libstdc++/41530
+void test01()
+{
+ std::tuple<B*> b;
+ std::tuple<A*> a1(b);
+ std::tuple<A*> a2(std::move(b));
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc
index 88ea5098f8e..089b10b83a6 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc
@@ -38,26 +38,26 @@ test01()
a.resize(98);
a.resize(99);
a.resize(100);
-#ifndef _GLIBCXX_DEBUG
+#if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE
VERIFY( copycounter::copycount == 100 );
#else
VERIFY( copycounter::copycount == 100 + 4 );
#endif
a.resize(99);
a.resize(0);
-#ifndef _GLIBCXX_DEBUG
+#if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE
VERIFY( copycounter::copycount == 100 );
#else
VERIFY( copycounter::copycount == 100 + 6 );
#endif
a.resize(100);
-#ifndef _GLIBCXX_DEBUG
+#if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE
VERIFY( copycounter::copycount == 200 );
#else
VERIFY( copycounter::copycount == 200 + 7 );
#endif
a.clear();
-#ifndef _GLIBCXX_DEBUG
+#if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE
VERIFY( copycounter::copycount == 200 );
#else
VERIFY( copycounter::copycount == 200 + 7 );
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
index 48394079750..d51fc3bb662 100644
--- a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc
@@ -28,7 +28,7 @@ void test01()
typedef std::list<int> list_type;
list_type l;
-#ifndef _GLIBCXX_DEBUG
+#if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE
using std::_List_node;
#else
using std::_GLIBCXX_STD_D::_List_node;
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/profile/hash_map.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/profile/hash_map.cc
new file mode 100644
index 00000000000..7939a35e3ef
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/profile/hash_map.cc
@@ -0,0 +1,22 @@
+// { dg-options "-Wno-deprecated" }
+/* testing the gcc instrumented */
+
+#include <ext/hash_map>
+using namespace std;
+using __gnu_cxx::hash_map;
+
+int main()
+{
+ hash_map <int, int> *tmp;
+
+ for (int j=1; j<=10; j++)
+ {
+ tmp = new hash_map<int, int>;
+ // Insert more than default item
+ for (int i=0; i<10000*j; i++) {
+ (*tmp)[i]= i;
+ }
+ delete tmp;
+ }
+}
+
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/profile/unordered.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/profile/unordered.cc
new file mode 100644
index 00000000000..93b506e9832
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/profile/unordered.cc
@@ -0,0 +1,47 @@
+// { dg-options "-std=gnu++0x" }
+/* testing the gcc instrumented */
+
+#include <unordered_map>
+#include <unordered_set>
+using std::unordered_map;
+using std::unordered_set;
+
+void test_unordered_set()
+{
+ // Test for unordered set
+ unordered_set <int> *tmp2;
+ tmp2 = new unordered_set<int>;
+ tmp2->insert(1);
+ delete tmp2;
+}
+void test_unordered_map()
+{
+ unordered_map <int, int> *tmp;
+ for (int i=0; i<20; i++)
+ {
+ tmp = new unordered_map<int, int>(i+2);
+ // Insert more than default item
+ for (int j=0; j<10000; j++) {
+ (*tmp)[j]= j;
+ }
+
+ delete tmp;
+ }
+
+ tmp = new unordered_map<int, int>;
+
+ // Insert more than default item
+ for (int i=0; i<150000; i++) {
+// (*tmp)[i] = i;
+ (*tmp).insert(unordered_map<int, int>::value_type(i, i));
+ }
+
+ (*tmp).erase(1);
+ delete tmp;
+}
+int main()
+{
+ test_unordered_set();
+ test_unordered_map();
+}
+
diff --git a/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc b/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc
new file mode 100644
index 00000000000..1e9d01afec5
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc
@@ -0,0 +1,18 @@
+// Test vector: performance difference 25% (0.444s vs 0.539s)
+// Advice: set tmp as 10000
+
+#include <vector>
+
+using std::vector;
+
+int main()
+{
+ vector <int> tmp;
+
+ for (int j=0; j<2000; j++)
+ // Insert more than default item
+ for (int i=0; i<10000; i++) {
+ tmp.push_back(i);
+ }
+}
+
diff --git a/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc
index 407f6ed390b..47fdf8fcafa 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc
@@ -41,26 +41,26 @@ test01()
a.resize(98);
a.resize(99);
a.resize(100);
-#ifndef _GLIBCXX_DEBUG
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PROFILE)
VERIFY( copycounter::copycount == 100 + 1 );
#else
VERIFY( copycounter::copycount == 100 + 1 + 4 );
#endif
a.resize(99);
a.resize(0);
-#ifndef _GLIBCXX_DEBUG
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PROFILE)
VERIFY( copycounter::copycount == 100 + 1 );
#else
VERIFY( copycounter::copycount == 100 + 1 + 6 );
#endif
a.resize(100);
-#ifndef _GLIBCXX_DEBUG
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PROFILE)
VERIFY( copycounter::copycount == 200 + 2 );
#else
VERIFY( copycounter::copycount == 200 + 2 + 7 );
#endif
a.clear();
-#ifndef _GLIBCXX_DEBUG
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PROFILE)
VERIFY( copycounter::copycount == 200 + 2 );
#else
VERIFY( copycounter::copycount == 200 + 2 + 7 );
diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
new file mode 100644
index 00000000000..4b07a63edee
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.3.4 [lib.alg.merge]
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::bidirectional_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, bidirectional_iterator_wrapper> container;
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[]={0,2,4,1,3,5};
+ rvalstruct rv_array[6];
+ std::copy(array, array + 6, rv_array);
+ container con(rv_array, rv_array + 6);
+ std::inplace_merge(con.begin(), con.it(3), con.end());
+ VERIFY( rv_array[0] == 0 && rv_array[1] == 1 && rv_array[2] == 2
+ && rv_array[3] == 3 && rv_array[4] == 4 && rv_array[5] == 5 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
new file mode 100644
index 00000000000..32ab3c70c6b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
@@ -0,0 +1,56 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.3.4 [lib.alg.merge]
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::bidirectional_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, bidirectional_iterator_wrapper> container;
+
+bool
+are_ordered(const rvalstruct& lhs, const rvalstruct& rhs)
+{ return lhs < rhs; }
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[]={0,2,4,1,3,5};
+ rvalstruct rv_array[6];
+ std::copy(array, array + 6, rv_array);
+ container con(rv_array, rv_array + 6);
+ std::inplace_merge(con.begin(), con.it(3), con.end(), are_ordered);
+ VERIFY( rv_array[0] == 0 && rv_array[1] == 1 && rv_array[2] == 2
+ && rv_array[3] == 3 && rv_array[4] == 4 && rv_array[5] == 5 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc
new file mode 100644
index 00000000000..d48d6029a52
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc
@@ -0,0 +1,79 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.2.10 rotate
+
+// Tests rotate when an moveable class is used
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::forward_iterator_wrapper;
+using __gnu_test::bidirectional_iterator_wrapper;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, forward_iterator_wrapper> Fcontainer;
+typedef test_container<rvalstruct, bidirectional_iterator_wrapper> Bcontainer;
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Rcontainer;
+
+template<typename Con>
+ void
+ test_con(int length, int rotate_pos)
+ {
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct array[length];
+ for(int i = 0; i < length; ++i)
+ array[i] = i;
+ Con con(array, array + length);
+ std::rotate(con.begin(), con.it(rotate_pos), con.end());
+
+ if(length != 0)
+ {
+ for(int i = 0; i < length; ++i)
+ VERIFY( array[i].valid && array[i].val == (i + rotate_pos) % length );
+ }
+ }
+
+void
+test01()
+{
+ for(int i = 0; i < 20; ++i)
+ {
+ for(int j = 0; j <= i; ++j)
+ {
+ test_con<Fcontainer>(i, j);
+ test_con<Bcontainer>(i, j);
+ test_con<Rcontainer>(i, j);
+ }
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
new file mode 100644
index 00000000000..193f1312849
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
@@ -0,0 +1,64 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without Pred 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.2.12 [lib.alg.partitions] Partitions.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
+const int B[] = {2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17};
+const int N = sizeof(A) / sizeof(int);
+
+struct Pred
+{
+ bool
+ operator()(const rvalstruct& x) const
+ { return (x.val % 2) == 0; }
+};
+
+// 25.2.12 stable_partition()
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct s1[N];
+ std::copy(A, A + N, s1);
+ Container con(s1, s1 + N);
+
+ std::stable_partition(con.begin(), con.end(), Pred());
+ VERIFY( std::equal(s1, s1 + N, B) );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable.cc
new file mode 100644
index 00000000000..09d6129c06c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable.cc
@@ -0,0 +1,59 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.3.1.2 [lib.stable.sort]
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+const int A[] = { 10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7,
+ 17, 8, 18, 9, 19 };
+const int N = sizeof(A) / sizeof(int);
+
+// 25.3.1.2 stable_sort()
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct s1[N];
+ std::copy(A, A + N, s1);
+ Container con(s1, s1 + N);
+ std::stable_sort(con.begin(), con.end());
+ VERIFY( s1[0].valid );
+ for(int i = 1; i < N; ++i)
+ VERIFY( s1[i].val>s1[i-1].val && s1[i].valid );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable2.cc
new file mode 100644
index 00000000000..86ff353967d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/moveable2.cc
@@ -0,0 +1,62 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 25.3.1.2 [lib.stable.sort]
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+const int A[] = { 10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7,
+ 17, 8, 18, 9, 19 };
+const int N = sizeof(A) / sizeof(int);
+
+bool order(const rvalstruct& lhs, const rvalstruct& rhs)
+{ return lhs < rhs; }
+
+// 25.3.1.2 stable_sort()
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct s1[N];
+ std::copy(A, A + N, s1);
+ Container con(s1, s1 + N);
+ std::stable_sort(con.begin(), con.end(), order);
+ VERIFY( s1[0].valid );
+ for(int i = 1; i < N; ++i)
+ VERIFY( s1[i].val>s1[i-1].val && s1[i].valid );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index 73c913b869a..c8176072326 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -196,6 +196,9 @@ libgomp_flags=-B${glibcxx_builddir}/../libgomp \
atomic_flags=$(ATOMIC_FLAGS)
parallel_flags="unix/-D_GLIBCXX_PARALLEL/-fopenmp"
+# Runs the testsuite in profile mode.
+profile_flags = "unix/-D_GLIBCXX_PROFILE"
+
check-parallel: site.exp
-@(if test ! -d $${libgomp_dir}; then \
echo "Testing parallel mode failed as libgomp not present."; \
@@ -214,8 +217,17 @@ check-performance-parallel: testsuite_files_performance ${performance_script}
CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
+check-profile: site.exp
+ -@(outputdir=profile; export outputdir; \
+ if test ! -d $${outputdir}; then \
+ mkdir $${outputdir}; \
+ fi; \
+ srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+ $(MAKE) CXXFLAGS="$(atomic_flags) " RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(profile_flags)" check-DEJAGNU; )
+
.PHONY: baseline_symbols new-abi-baseline \
- check-abi check-compile check-performance check-parallel
+ check-abi check-compile check-performance check-parallel check-profile
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
@@ -224,4 +236,4 @@ CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
# To remove directories.
clean-local:
- rm -rf parallel
+ rm -rf parallel profile
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 6ee34ae9400..cae3d6c07fe 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -299,6 +299,9 @@ libgomp_flags = -B${glibcxx_builddir}/../libgomp \
atomic_flags = $(ATOMIC_FLAGS)
parallel_flags = "unix/-D_GLIBCXX_PARALLEL/-fopenmp"
+# Runs the testsuite in profile mode.
+profile_flags = "unix/-D_GLIBCXX_PROFILE"
+
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
testsuite_* site.exp abi_check baseline_symbols *TEST* *.dat \
@@ -642,12 +645,21 @@ check-performance-parallel: testsuite_files_performance ${performance_script}
CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
+check-profile: site.exp
+ -@(outputdir=profile; export outputdir; \
+ if test ! -d $${outputdir}; then \
+ mkdir $${outputdir}; \
+ fi; \
+ srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+ $(MAKE) CXXFLAGS="$(atomic_flags) " RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(profile_flags)" check-DEJAGNU; )
+
.PHONY: baseline_symbols new-abi-baseline \
- check-abi check-compile check-performance check-parallel
+ check-abi check-compile check-performance check-parallel check-profile
# To remove directories.
clean-local:
- rm -rf parallel
+ rm -rf parallel profile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libstdc++-v3/testsuite/decimal/binary-arith.cc b/libstdc++-v3/testsuite/decimal/binary-arith.cc
new file mode 100644
index 00000000000..180bca57167
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/binary-arith.cc
@@ -0,0 +1,372 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.8 Binary arithmetic operators.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 d32 (5);
+decimal64 d64 (-10);
+decimal128 d128 (25);
+int si = -20;
+unsigned int ui = 50;
+long sl = -10;
+unsigned long ul = 20;
+long long sll = -25;
+unsigned long long ull = 50;
+
+void
+binary_add_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = si + a; VERIFY (b == 980);
+ b = ui + a; VERIFY (b == 1050);
+ b = sl + a; VERIFY (b == 990);
+ b = ul + a; VERIFY (b == 1020);
+ b = sll + a; VERIFY (b == 975);
+ b = ull + a; VERIFY (b == 1050);
+ b = d32 + a; VERIFY (b == 1005);
+ b = (decimal32)(d64 + a); VERIFY (b == 990);
+ b = (decimal32)(d128 + a); VERIFY (b == 1025);
+
+ b = a + si; VERIFY (b == 980);
+ b = a + ui; VERIFY (b == 1050);
+ b = a + sl; VERIFY (b == 990);
+ b = a + ul; VERIFY (b == 1020);
+ b = a + sll; VERIFY (b == 975);
+ b = a + ull; VERIFY (b == 1050);
+ b = a + d32; VERIFY (b == 1005);
+ b = (decimal32)(a + d64); VERIFY (b == 990);
+ b = (decimal32)(a + d128); VERIFY (b == 1025);
+}
+
+void
+binary_subtract_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a - si; VERIFY (b == 1020);
+ b = a - ui; VERIFY (b == 950);
+ b = a - sl; VERIFY (b == 1010);
+ b = a - ul; VERIFY (b == 980);
+ b = a - sll; VERIFY (b == 1025);
+ b = a - ull; VERIFY (b == 950);
+ b = a - d32; VERIFY (b == 995);
+ b = (decimal32)(a - d64); VERIFY (b == 1010);
+ b = (decimal32)(a - d128); VERIFY (b == 975);
+
+ a = -1000;
+ b = si - a; VERIFY (b == 980);
+ b = ui - a; VERIFY (b == 1050);
+ b = sl - a; VERIFY (b == 990);
+ b = ul - a; VERIFY (b == 1020);
+ b = sll - a; VERIFY (b == 975);
+ b = ull - a; VERIFY (b == 1050);
+ b = d32 - a; VERIFY (b == 1005);
+ b = (decimal32)(d64 - a); VERIFY (b == 990);
+ b = (decimal32)(d128 - a); VERIFY (b == 1025);
+}
+
+void
+binary_multiply_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a * si; VERIFY (b == -20000);
+ b = a * ui; VERIFY (b == 50000);
+ b = a * sl; VERIFY (b == -10000);
+ b = a * ul; VERIFY (b == 20000);
+ b = a * sll; VERIFY (b == -25000);
+ b = a * ull; VERIFY (b == 50000);
+ b = a * d32; VERIFY (b == 5000);
+ b = (decimal32)(a * d64); VERIFY (b == -10000);
+ b = (decimal32)(a * d128); VERIFY (b == 25000);
+
+ b = si * a; VERIFY (b == -20000);
+ b = ui * a; VERIFY (b == 50000);
+ b = sl * a; VERIFY (b == -10000);
+ b = ul * a; VERIFY (b == 20000);
+ b = sll * a; VERIFY (b == -25000);
+ b = ull * a; VERIFY (b == 50000);
+ b = d32 * a; VERIFY (b == 5000);
+ b = (decimal32)(d64 * a); VERIFY (b == -10000);
+ b = (decimal32)(d128 * a); VERIFY (b == 25000);
+}
+
+void
+binary_divide_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a / si; VERIFY (b == -50);
+ b = a / ui; VERIFY (b == 20);
+ b = a / sl; VERIFY (b == -100);
+ b = a / ul; VERIFY (b == 50);
+ b = a / sll; VERIFY (b == -40);
+ b = a / ull; VERIFY (b == 20);
+ b = a / d32; VERIFY (b == 200);
+ b = (decimal32)(a / d64); VERIFY (b == -100);
+ b = (decimal32)(a / d128); VERIFY (b == 40);
+
+ a = 5;
+ b = si / a; VERIFY (b == -4);
+ b = ui / a; VERIFY (b == 10);
+ b = sl / a; VERIFY (b == -2);
+ b = ul / a; VERIFY (b == 4);
+ b = sll / a; VERIFY (b == -5);
+ b = ull / a; VERIFY (b == 10);
+ b = d32 / a; VERIFY (b == 1);
+ b = (decimal32)(d64 / a); VERIFY (b == -2);
+ b = (decimal32)(d128 / a); VERIFY (b == 5);
+}
+
+void
+binary_add_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a + si; VERIFY (b == 980);
+ b = a + ui; VERIFY (b == 1050);
+ b = a + sl; VERIFY (b == 990);
+ b = a + ul; VERIFY (b == 1020);
+ b = a + sll; VERIFY (b == 975);
+ b = a + ull; VERIFY (b == 1050);
+ b = a + d32; VERIFY (b == 1005);
+ b = a + d64; VERIFY (b == 990);
+ b = (decimal64)(a + d128); VERIFY (b == 1025);
+
+ b = a + si; VERIFY (b == 980);
+ b = a + ui; VERIFY (b == 1050);
+ b = a + sl; VERIFY (b == 990);
+ b = a + ul; VERIFY (b == 1020);
+ b = a + sll; VERIFY (b == 975);
+ b = a + ull; VERIFY (b == 1050);
+ b = a + d32; VERIFY (b == 1005);
+ b = a + d64; VERIFY (b == 990);
+ b = (decimal64)(a + d128); VERIFY (b == 1025);
+}
+
+void
+binary_subtract_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a - si; VERIFY (b == 1020);
+ b = a - ui; VERIFY (b == 950);
+ b = a - sl; VERIFY (b == 1010);
+ b = a - ul; VERIFY (b == 980);
+ b = a - sll; VERIFY (b == 1025);
+ b = a - ull; VERIFY (b == 950);
+ b = a - d32; VERIFY (b == 995);
+ b = a - d64; VERIFY (b == 1010);
+ b = (decimal64)(a - d128); VERIFY (b == 975);
+
+ a = -1000;
+ b = si - a; VERIFY (b == 980);
+ b = ui - a; VERIFY (b == 1050);
+ b = sl - a; VERIFY (b == 990);
+ b = ul - a; VERIFY (b == 1020);
+ b = sll - a; VERIFY (b == 975);
+ b = ull - a; VERIFY (b == 1050);
+ b = d32 - a; VERIFY (b == 1005);
+ b = d64 - a; VERIFY (b == 990);
+ b = (decimal64)(d128 - a); VERIFY (b == 1025);
+}
+
+void
+binary_multiply_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a * si; VERIFY (b == -20000);
+ b = a * ui; VERIFY (b == 50000);
+ b = a * sl; VERIFY (b == -10000);
+ b = a * ul; VERIFY (b == 20000);
+ b = a * sll; VERIFY (b == -25000);
+ b = a * ull; VERIFY (b == 50000);
+ b = a * d32; VERIFY (b == 5000);
+ b = a * d64; VERIFY (b == -10000);
+ b = (decimal64)(a * d128); VERIFY (b == 25000);
+
+ b = si * a; VERIFY (b == -20000);
+ b = ui * a; VERIFY (b == 50000);
+ b = sl * a; VERIFY (b == -10000);
+ b = ul * a; VERIFY (b == 20000);
+ b = sll * a; VERIFY (b == -25000);
+ b = ull * a; VERIFY (b == 50000);
+ b = d32 * a; VERIFY (b == 5000);
+ b = d64 * a; VERIFY (b == -10000);
+ b = (decimal64)(d128 * a); VERIFY (b == 25000);
+}
+
+void
+binary_divide_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a / si; VERIFY (b == -50);
+ b = a / ui; VERIFY (b == 20);
+ b = a / sl; VERIFY (b == -100);
+ b = a / ul; VERIFY (b == 50);
+ b = a / sll; VERIFY (b == -40);
+ b = a / ull; VERIFY (b == 20);
+ b = a / d32; VERIFY (b == 200);
+ b = a / d64; VERIFY (b == -100);
+ b = (decimal64)(a / d128); VERIFY (b == 40);
+
+ a = 5;
+ b = si / a; VERIFY (b == -4);
+ b = ui / a; VERIFY (b == 10);
+ b = sl / a; VERIFY (b == -2);
+ b = ul / a; VERIFY (b == 4);
+ b = sll / a; VERIFY (b == -5);
+ b = ull / a; VERIFY (b == 10);
+ b = d32 / a; VERIFY (b == 1);
+ b = d64 / a; VERIFY (b == -2);
+ b = (decimal64)(d128 / a); VERIFY (b == 5);
+}
+
+void
+binary_add_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a + si; VERIFY (b == 980);
+ b = a + ui; VERIFY (b == 1050);
+ b = a + sl; VERIFY (b == 990);
+ b = a + ul; VERIFY (b == 1020);
+ b = a + sll; VERIFY (b == 975);
+ b = a + ull; VERIFY (b == 1050);
+ b = a + d32; VERIFY (b == 1005);
+ b = a + d64; VERIFY (b == 990);
+ b = a + d128; VERIFY (b == 1025);
+
+ b = a + si; VERIFY (b == 980);
+ b = a + ui; VERIFY (b == 1050);
+ b = a + sl; VERIFY (b == 990);
+ b = a + ul; VERIFY (b == 1020);
+ b = a + sll; VERIFY (b == 975);
+ b = a + ull; VERIFY (b == 1050);
+ b = a + d32; VERIFY (b == 1005);
+ b = a + d64; VERIFY (b == 990);
+ b = a + d128; VERIFY (b == 1025);
+}
+
+void
+binary_subtract_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a - si; VERIFY (b == 1020);
+ b = a - ui; VERIFY (b == 950);
+ b = a - sl; VERIFY (b == 1010);
+ b = a - ul; VERIFY (b == 980);
+ b = a - sll; VERIFY (b == 1025);
+ b = a - ull; VERIFY (b == 950);
+ b = a - d32; VERIFY (b == 995);
+ b = a - d64; VERIFY (b == 1010);
+ b = a - d128; VERIFY (b == 975);
+
+ a = -1000;
+ b = si - a; VERIFY (b == 980);
+ b = ui - a; VERIFY (b == 1050);
+ b = sl - a; VERIFY (b == 990);
+ b = ul - a; VERIFY (b == 1020);
+ b = sll - a; VERIFY (b == 975);
+ b = ull - a; VERIFY (b == 1050);
+ b = d32 - a; VERIFY (b == 1005);
+ b = d64 - a; VERIFY (b == 990);
+ b = d128 - a; VERIFY (b == 1025);
+}
+
+void
+binary_multiply_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a * si; VERIFY (b == -20000);
+ b = a * ui; VERIFY (b == 50000);
+ b = a * sl; VERIFY (b == -10000);
+ b = a * ul; VERIFY (b == 20000);
+ b = a * sll; VERIFY (b == -25000);
+ b = a * ull; VERIFY (b == 50000);
+ b = a * d32; VERIFY (b == 5000);
+ b = a * d64; VERIFY (b == -10000);
+ b = a * d128; VERIFY (b == 25000);
+
+ b = si * a; VERIFY (b == -20000);
+ b = ui * a; VERIFY (b == 50000);
+ b = sl * a; VERIFY (b == -10000);
+ b = ul * a; VERIFY (b == 20000);
+ b = sll * a; VERIFY (b == -25000);
+ b = ull * a; VERIFY (b == 50000);
+ b = d32 * a; VERIFY (b == 5000);
+ b = d64 * a; VERIFY (b == -10000);
+ b = d128 * a; VERIFY (b == 25000);
+}
+
+void
+binary_divide_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a / si; VERIFY (b == -50);
+ b = a / ui; VERIFY (b == 20);
+ b = a / sl; VERIFY (b == -100);
+ b = a / ul; VERIFY (b == 50);
+ b = a / sll; VERIFY (b == -40);
+ b = a / ull; VERIFY (b == 20);
+ b = a / d32; VERIFY (b == 200);
+ b = a / d64; VERIFY (b == -100);
+ b = a / d128; VERIFY (b == 40);
+
+ a = 5;
+ b = si / a; VERIFY (b == -4);
+ b = ui / a; VERIFY (b == 10);
+ b = sl / a; VERIFY (b == -2);
+ b = ul / a; VERIFY (b == 4);
+ b = sll / a; VERIFY (b == -5);
+ b = ull / a; VERIFY (b == 10);
+ b = d32 / a; VERIFY (b == 1);
+ b = d64 / a; VERIFY (b == -2);
+ b = d128 / a; VERIFY (b == 5);
+}
+
+int
+main ()
+{
+ binary_add_32 ();
+ binary_subtract_32 ();
+ binary_multiply_32 ();
+ binary_divide_32 ();
+
+ binary_add_64 ();
+ binary_subtract_64 ();
+ binary_multiply_64 ();
+ binary_divide_64 ();
+
+ binary_add_128 ();
+ binary_subtract_128 ();
+ binary_multiply_128 ();
+ binary_divide_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/cast_neg.cc b/libstdc++-v3/testsuite/decimal/cast_neg.cc
new file mode 100644
index 00000000000..23749ba5e75
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/cast_neg.cc
@@ -0,0 +1,62 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile }
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 doesn't say explicitly that the conversion from a
+// decimal floating-point type to a generic float type is prohibited but
+// it implies that in section 4.3 when it says "In C, objects of decimal
+// floating-oint type can be converted to generic floating-point type by
+// means of an explicit cast. In C++ this is not possible." Check that
+// attempt to do a cast are flagged as errors.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+float f;
+double d;
+long double ld;
+decimal32 d32;
+decimal64 d64;
+decimal128 d128;
+
+void
+foo (void)
+{
+ f = d32; // { dg-error "error" }
+ f = d64; // { dg-error "error" }
+ f = d128; // { dg-error "error" }
+ d = d32; // { dg-error "error" }
+ d = d64; // { dg-error "error" }
+ d = d128; // { dg-error "error" }
+ ld = d32; // { dg-error "error" }
+ ld = d64; // { dg-error "error" }
+ ld = d128; // { dg-error "error" }
+
+ f = (float)d32; // { dg-error "error" }
+ f = (float)d64; // { dg-error "error" }
+ f = (float)d128; // { dg-error "error" }
+ d = (double)d32; // { dg-error "error" }
+ d = (double)d64; // { dg-error "error" }
+ d = (double)d128; // { dg-error "error" }
+ ld = (long double)d32; // { dg-error "error" }
+ ld = (long double)d64; // { dg-error "error" }
+ ld = (long double)d128; // { dg-error "error" }
+}
diff --git a/libstdc++-v3/testsuite/decimal/comparison.cc b/libstdc++-v3/testsuite/decimal/comparison.cc
new file mode 100644
index 00000000000..1efa637ac4a
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/comparison.cc
@@ -0,0 +1,546 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.9 Comparison operators.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 d32 (5);
+decimal64 d64 (-10);
+decimal128 d128 (25);
+int si = -20;
+unsigned int ui = 50;
+long sl = -10;
+unsigned long ul = 20;
+long long sll = -25;
+unsigned long long ull = 50;
+
+void
+compare_eq_32 (void)
+{
+ decimal32 a;
+
+ a = si; VERIFY (a == si); VERIFY (si == a);
+ a = ui; VERIFY (a == ui); VERIFY (ui == a);
+ a = sl; VERIFY (a == sl); VERIFY (sl == a);
+ a = ul; VERIFY (a == ul); VERIFY (ul == a);
+ a = sll; VERIFY (a == sll); VERIFY (sll == a);
+ a = ull; VERIFY (a == ull); VERIFY (ull == a);
+ a = d32; VERIFY (a == d32); VERIFY (d32 == a);
+ a = (decimal32)d64; VERIFY (a == d64); VERIFY (d64 == a);
+ a = (decimal32)d128; VERIFY (a == d128); VERIFY (d128 == a);
+}
+
+void
+compare_ne_32 (void)
+{
+ decimal32 a = 100;
+
+ VERIFY (a != si); VERIFY (si != a);
+ VERIFY (a != ui); VERIFY (ui != a);
+ VERIFY (a != sl); VERIFY (sl != a);
+ VERIFY (a != ul); VERIFY (ul != a);
+ VERIFY (a != sll); VERIFY (sll != a);
+ VERIFY (a != ull); VERIFY (ull != a);
+ VERIFY (a != d32); VERIFY (d32 != a);
+ VERIFY (a != d64); VERIFY (d64 != a);
+ VERIFY (a != d128); VERIFY (d128 != a);
+}
+
+void
+compare_lt_32 (void)
+{
+ decimal32 a = -100;
+
+ VERIFY (a < si);
+ VERIFY (a < ui);
+ VERIFY (a < sl);
+ VERIFY (a < ul);
+ VERIFY (a < sll);
+ VERIFY (a < ull);
+ VERIFY (a < d32);
+ VERIFY (a < d64);
+ VERIFY (a < d128);
+
+ a = 100;
+ VERIFY (si < a);
+ VERIFY (ui < a);
+ VERIFY (sl < a);
+ VERIFY (ul < a);
+ VERIFY (sll < a);
+ VERIFY (ull < a);
+ VERIFY (d32 < a);
+ VERIFY (d64 < a);
+ VERIFY (d128 < a);
+}
+
+void
+compare_le_32 (void)
+{
+ decimal32 a;
+
+ a = si; VERIFY (a <= si); VERIFY (si <= a);
+ a = ui; VERIFY (a <= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a <= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a <= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a <= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a <= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a <= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a <= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a <= d128); VERIFY (d128 <= a);
+
+ a = -100;
+ VERIFY (a <= si);
+ VERIFY (a <= ui);
+ VERIFY (a <= sl);
+ VERIFY (a <= ul);
+ VERIFY (a <= sll);
+ VERIFY (a <= ull);
+ VERIFY (a <= d32);
+ VERIFY (a <= d64);
+ VERIFY (a <= d128);
+
+ a = 100;
+ VERIFY (si <= a);
+ VERIFY (ui <= a);
+ VERIFY (sl <= a);
+ VERIFY (ul <= a);
+ VERIFY (sll <= a);
+ VERIFY (ull <= a);
+ VERIFY (d32 <= a);
+ VERIFY (d64 <= a);
+ VERIFY (d128 <= a);
+}
+
+void
+compare_gt_32 (void)
+{
+ decimal32 a = 100;
+
+ VERIFY (a > si);
+ VERIFY (a > ui);
+ VERIFY (a > sl);
+ VERIFY (a > ul);
+ VERIFY (a > sll);
+ VERIFY (a > ull);
+ VERIFY (a > d32);
+ VERIFY (a > d64);
+ VERIFY (a > d128);
+
+ a = -100;
+ VERIFY (si > a);
+ VERIFY (ui > a);
+ VERIFY (sl > a);
+ VERIFY (ul > a);
+ VERIFY (sll > a);
+ VERIFY (ull > a);
+ VERIFY (d32 > a);
+ VERIFY (d64 > a);
+ VERIFY (d128 > a);
+}
+
+void
+compare_ge_32 (void)
+{
+ decimal32 a;
+
+ a = si; VERIFY (a >= si); VERIFY (si <= a);
+ a = ui; VERIFY (a >= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a >= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a >= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a >= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a >= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a >= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a >= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a >= d128); VERIFY (d128 <= a);
+
+ a = 100;
+ VERIFY (a >= si);
+ VERIFY (a >= ui);
+ VERIFY (a >= sl);
+ VERIFY (a >= ul);
+ VERIFY (a >= sll);
+ VERIFY (a >= ull);
+ VERIFY (a >= d32);
+ VERIFY (a >= d64);
+ VERIFY (a >= d128);
+
+ a = -100;
+ VERIFY (si >= a);
+ VERIFY (ui >= a);
+ VERIFY (sl >= a);
+ VERIFY (ul >= a);
+ VERIFY (sll >= a);
+ VERIFY (ull >= a);
+ VERIFY (d32 >= a);
+ VERIFY (d64 >= a);
+ VERIFY (d128 >= a);
+}
+
+void
+compare_eq_64 (void)
+{
+ decimal64 a;
+
+ a = si; VERIFY (a == si); VERIFY (si == a);
+ a = ui; VERIFY (a == ui); VERIFY (ui == a);
+ a = sl; VERIFY (a == sl); VERIFY (sl == a);
+ a = ul; VERIFY (a == ul); VERIFY (ul == a);
+ a = sll; VERIFY (a == sll); VERIFY (sll == a);
+ a = ull; VERIFY (a == ull); VERIFY (ull == a);
+ a = d32; VERIFY (a == d32); VERIFY (d32 == a);
+ a = d64; VERIFY (a == d64); VERIFY (d64 == a);
+ a = (decimal64)d128; VERIFY (a == d128); VERIFY (d128 == a);
+}
+
+void
+compare_ne_64 (void)
+{
+ decimal64 a = 100;
+
+ VERIFY (a != si); VERIFY (si != a);
+ VERIFY (a != ui); VERIFY (ui != a);
+ VERIFY (a != sl); VERIFY (sl != a);
+ VERIFY (a != ul); VERIFY (ul != a);
+ VERIFY (a != sll); VERIFY (sll != a);
+ VERIFY (a != ull); VERIFY (ull != a);
+ VERIFY (a != d32); VERIFY (d32 != a);
+ VERIFY (a != d64); VERIFY (d64 != a);
+ VERIFY (a != d128); VERIFY (d128 != a);
+}
+
+void
+compare_lt_64 (void)
+{
+ decimal64 a = -100;
+
+ VERIFY (a < si);
+ VERIFY (a < ui);
+ VERIFY (a < sl);
+ VERIFY (a < ul);
+ VERIFY (a < sll);
+ VERIFY (a < ull);
+ VERIFY (a < d32);
+ VERIFY (a < d64);
+ VERIFY (a < d128);
+
+ a = 100;
+ VERIFY (si < a);
+ VERIFY (ui < a);
+ VERIFY (sl < a);
+ VERIFY (ul < a);
+ VERIFY (sll < a);
+ VERIFY (ull < a);
+ VERIFY (d32 < a);
+ VERIFY (d64 < a);
+ VERIFY (d128 < a);
+}
+
+void
+compare_le_64 (void)
+{
+ decimal64 a;
+
+ a = si; VERIFY (a <= si); VERIFY (si <= a);
+ a = ui; VERIFY (a <= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a <= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a <= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a <= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a <= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a <= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a <= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a <= d128); VERIFY (d128 <= a);
+
+ a = -100;
+ VERIFY (a <= si);
+ VERIFY (a <= ui);
+ VERIFY (a <= sl);
+ VERIFY (a <= ul);
+ VERIFY (a <= sll);
+ VERIFY (a <= ull);
+ VERIFY (a <= d32);
+ VERIFY (a <= d64);
+ VERIFY (a <= d128);
+
+ a = 100;
+ VERIFY (si <= a);
+ VERIFY (ui <= a);
+ VERIFY (sl <= a);
+ VERIFY (ul <= a);
+ VERIFY (sll <= a);
+ VERIFY (ull <= a);
+ VERIFY (d32 <= a);
+ VERIFY (d64 <= a);
+ VERIFY (d128 <= a);
+}
+
+void
+compare_gt_64 (void)
+{
+ decimal64 a = 100;
+
+ VERIFY (a > si);
+ VERIFY (a > ui);
+ VERIFY (a > sl);
+ VERIFY (a > ul);
+ VERIFY (a > sll);
+ VERIFY (a > ull);
+ VERIFY (a > d32);
+ VERIFY (a > d64);
+ VERIFY (a > d128);
+
+ a = -100;
+ VERIFY (si > a);
+ VERIFY (ui > a);
+ VERIFY (sl > a);
+ VERIFY (ul > a);
+ VERIFY (sll > a);
+ VERIFY (ull > a);
+ VERIFY (d32 > a);
+ VERIFY (d64 > a);
+ VERIFY (d128 > a);
+}
+
+void
+compare_ge_64 (void)
+{
+ decimal64 a;
+
+ a = si; VERIFY (a >= si); VERIFY (si <= a);
+ a = ui; VERIFY (a >= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a >= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a >= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a >= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a >= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a >= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a >= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a >= d128); VERIFY (d128 <= a);
+
+ a = 100;
+ VERIFY (a >= si);
+ VERIFY (a >= ui);
+ VERIFY (a >= sl);
+ VERIFY (a >= ul);
+ VERIFY (a >= sll);
+ VERIFY (a >= ull);
+ VERIFY (a >= d32);
+ VERIFY (a >= d64);
+ VERIFY (a >= d128);
+
+ a = -100;
+ VERIFY (si >= a);
+ VERIFY (ui >= a);
+ VERIFY (sl >= a);
+ VERIFY (ul >= a);
+ VERIFY (sll >= a);
+ VERIFY (ull >= a);
+ VERIFY (d32 >= a);
+ VERIFY (d64 >= a);
+ VERIFY (d128 >= a);
+}
+
+void
+compare_eq_128 (void)
+{
+ decimal128 a;
+
+ a = si; VERIFY (a == si); VERIFY (si == a);
+ a = ui; VERIFY (a == ui); VERIFY (ui == a);
+ a = sl; VERIFY (a == sl); VERIFY (sl == a);
+ a = ul; VERIFY (a == ul); VERIFY (ul == a);
+ a = sll; VERIFY (a == sll); VERIFY (sll == a);
+ a = ull; VERIFY (a == ull); VERIFY (ull == a);
+ a = d32; VERIFY (a == d32); VERIFY (d32 == a);
+ a = d64; VERIFY (a == d64); VERIFY (d64 == a);
+ a = d128; VERIFY (a == d128); VERIFY (d128 == a);
+}
+
+void
+compare_ne_128 (void)
+{
+ decimal128 a = 100;
+
+ VERIFY (a != si); VERIFY (si != a);
+ VERIFY (a != ui); VERIFY (ui != a);
+ VERIFY (a != sl); VERIFY (sl != a);
+ VERIFY (a != ul); VERIFY (ul != a);
+ VERIFY (a != sll); VERIFY (sll != a);
+ VERIFY (a != ull); VERIFY (ull != a);
+ VERIFY (a != d32); VERIFY (d32 != a);
+ VERIFY (a != d64); VERIFY (d64 != a);
+ VERIFY (a != d128); VERIFY (d128 != a);
+}
+
+void
+compare_lt_128 (void)
+{
+ decimal128 a = -100;
+
+ VERIFY (a < si);
+ VERIFY (a < ui);
+ VERIFY (a < sl);
+ VERIFY (a < ul);
+ VERIFY (a < sll);
+ VERIFY (a < ull);
+ VERIFY (a < d32);
+ VERIFY (a < d64);
+ VERIFY (a < d128);
+
+ a = 100;
+ VERIFY (si < a);
+ VERIFY (ui < a);
+ VERIFY (sl < a);
+ VERIFY (ul < a);
+ VERIFY (sll < a);
+ VERIFY (ull < a);
+ VERIFY (d32 < a);
+ VERIFY (d64 < a);
+ VERIFY (d128 < a);
+}
+
+void
+compare_le_128 (void)
+{
+ decimal128 a;
+
+ a = si; VERIFY (a <= si); VERIFY (si <= a);
+ a = ui; VERIFY (a <= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a <= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a <= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a <= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a <= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a <= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a <= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a <= d128); VERIFY (d128 <= a);
+
+ a = -100;
+ VERIFY (a <= si);
+ VERIFY (a <= ui);
+ VERIFY (a <= sl);
+ VERIFY (a <= ul);
+ VERIFY (a <= sll);
+ VERIFY (a <= ull);
+ VERIFY (a <= d32);
+ VERIFY (a <= d64);
+ VERIFY (a <= d128);
+
+ a = 100;
+ VERIFY (si <= a);
+ VERIFY (ui <= a);
+ VERIFY (sl <= a);
+ VERIFY (ul <= a);
+ VERIFY (sll <= a);
+ VERIFY (ull <= a);
+ VERIFY (d32 <= a);
+ VERIFY (d64 <= a);
+ VERIFY (d128 <= a);
+}
+
+void
+compare_gt_128 (void)
+{
+ decimal128 a = 100;
+
+ VERIFY (a > si);
+ VERIFY (a > ui);
+ VERIFY (a > sl);
+ VERIFY (a > ul);
+ VERIFY (a > sll);
+ VERIFY (a > ull);
+ VERIFY (a > d32);
+ VERIFY (a > d64);
+ VERIFY (a > d128);
+
+ a = -100;
+ VERIFY (si > a);
+ VERIFY (ui > a);
+ VERIFY (sl > a);
+ VERIFY (ul > a);
+ VERIFY (sll > a);
+ VERIFY (ull > a);
+ VERIFY (d32 > a);
+ VERIFY (d64 > a);
+ VERIFY (d128 > a);
+}
+
+void
+compare_ge_128 (void)
+{
+ decimal128 a;
+
+ a = si; VERIFY (a >= si); VERIFY (si <= a);
+ a = ui; VERIFY (a >= ui); VERIFY (ui <= a);
+ a = sl; VERIFY (a >= sl); VERIFY (sl <= a);
+ a = ul; VERIFY (a >= ul); VERIFY (ul <= a);
+ a = sll; VERIFY (a >= sll); VERIFY (sll <= a);
+ a = ull; VERIFY (a >= ull); VERIFY (ull <= a);
+ a = d32; VERIFY (a >= d32); VERIFY (d32 <= a);
+ a = (decimal32)d64; VERIFY (a >= d64); VERIFY (d64 <= a);
+ a = (decimal32)d128; VERIFY (a >= d128); VERIFY (d128 <= a);
+
+ a = 100;
+ VERIFY (a >= si);
+ VERIFY (a >= ui);
+ VERIFY (a >= sl);
+ VERIFY (a >= ul);
+ VERIFY (a >= sll);
+ VERIFY (a >= ull);
+ VERIFY (a >= d32);
+ VERIFY (a >= d64);
+ VERIFY (a >= d128);
+
+ a = -100;
+ VERIFY (si >= a);
+ VERIFY (ui >= a);
+ VERIFY (sl >= a);
+ VERIFY (ul >= a);
+ VERIFY (sll >= a);
+ VERIFY (ull >= a);
+ VERIFY (d32 >= a);
+ VERIFY (d64 >= a);
+ VERIFY (d128 >= a);
+}
+
+int
+main ()
+{
+ compare_eq_32 ();
+ compare_ne_32 ();
+ compare_lt_32 ();
+ compare_le_32 ();
+ compare_gt_32 ();
+ compare_ge_32 ();
+
+ compare_eq_64 ();
+ compare_ne_64 ();
+ compare_lt_64 ();
+ compare_le_64 ();
+ compare_gt_64 ();
+ compare_ge_64 ();
+
+ compare_eq_128 ();
+ compare_ne_128 ();
+ compare_lt_128 ();
+ compare_le_128 ();
+ compare_gt_128 ();
+ compare_ge_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/compound-assignment-memfunc.cc b/libstdc++-v3/testsuite/decimal/compound-assignment-memfunc.cc
new file mode 100644
index 00000000000..c216faa8095
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/compound-assignment-memfunc.cc
@@ -0,0 +1,250 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.6 Compound assignment (decimal32).
+// ISO/IEC TR 24733 3.2.3.6 Compound assignment (decimal64).
+// ISO/IEC TR 24733 3.2.4.6 Compound assignment (decimal128).
+
+// Access member functions directly.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 d32 (5);
+decimal64 d64 (-10);
+decimal128 d128 (25);
+int si = -2;
+unsigned int ui = 5;
+long sl = -10;
+unsigned long ul = 20;
+long long sll = -25;
+unsigned long long ull = 50;
+
+void
+compound_assignment_add_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b.operator+=(d32); VERIFY (b == 1005);
+ b = a; b.operator+=(d64); VERIFY (b == 990);
+ b = a; b.operator+=(d128); VERIFY (b == 1025);
+ b = a; b.operator+=(si); VERIFY (b == 998);
+ b = a; b.operator+=(ui); VERIFY (b == 1005);
+ b = a; b.operator+=(sl); VERIFY (b == 990);
+ b = a; b.operator+=(ul); VERIFY (b == 1020);
+ b = a; b.operator+=(sll); VERIFY (b == 975);
+ b = a; b.operator+=(ull); VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b.operator-=(d32); VERIFY (b == 995);
+ b = a; b.operator-=(d64); VERIFY (b == 1010);
+ b = a; b.operator-=(d128); VERIFY (b == 975);
+ b = a; b.operator-=(si); VERIFY (b == 1002);
+ b = a; b.operator-=(ui); VERIFY (b == 995);
+ b = a; b.operator-=(sl); VERIFY (b == 1010);
+ b = a; b.operator-=(ul); VERIFY (b == 980);
+ b = a; b.operator-=(sll); VERIFY (b == 1025);
+ b = a; b.operator-=(ull); VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b.operator*=(d32); VERIFY (b == 5000);
+ b = a; b.operator*=(d64); VERIFY (b == -10000);
+ b = a; b.operator*=(d128); VERIFY (b == 25000);
+ b = a; b.operator*=(si); VERIFY (b == -2000);
+ b = a; b.operator*=(ui); VERIFY (b == 5000);
+ b = a; b.operator*=(sl); VERIFY (b == -10000);
+ b = a; b.operator*=(ul); VERIFY (b == 20000);
+ b = a; b.operator*=(sll); VERIFY (b == -25000);
+ b = a; b.operator*=(ull); VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b.operator/=(d32); VERIFY (b == 200);
+ b = a; b.operator/=(d64); VERIFY (b == -100);
+ b = a; b.operator/=(d128); VERIFY (b == 40);
+ b = a; b.operator/=(si); VERIFY (b == -500);
+ b = a; b.operator/=(ui); VERIFY (b == 200);
+ b = a; b.operator/=(sl); VERIFY (b == -100);
+ b = a; b.operator/=(ul); VERIFY (b == 50);
+ b = a; b.operator/=(sll); VERIFY (b == -40);
+ b = a; b.operator/=(ull); VERIFY (b == 20);
+}
+
+void
+compound_assignment_add_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b.operator+=(d32); VERIFY (b == 1005);
+ b = a; b.operator+=(d64); VERIFY (b == 990);
+ b = a; b.operator+=(d128); VERIFY (b == 1025);
+ b = a; b.operator+=(si); VERIFY (b == 998);
+ b = a; b.operator+=(ui); VERIFY (b == 1005);
+ b = a; b.operator+=(sl); VERIFY (b == 990);
+ b = a; b.operator+=(ul); VERIFY (b == 1020);
+ b = a; b.operator+=(sll); VERIFY (b == 975);
+ b = a; b.operator+=(ull); VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b.operator-=(d32); VERIFY (b == 995);
+ b = a; b.operator-=(d64); VERIFY (b == 1010);
+ b = a; b.operator-=(d128); VERIFY (b == 975);
+ b = a; b.operator-=(si); VERIFY (b == 1002);
+ b = a; b.operator-=(ui); VERIFY (b == 995);
+ b = a; b.operator-=(sl); VERIFY (b == 1010);
+ b = a; b.operator-=(ul); VERIFY (b == 980);
+ b = a; b.operator-=(sll); VERIFY (b == 1025);
+ b = a; b.operator-=(ull); VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b.operator*=(d32); VERIFY (b == 5000);
+ b = a; b.operator*=(d64); VERIFY (b == -10000);
+ b = a; b.operator*=(d128); VERIFY (b == 25000);
+ b = a; b.operator*=(si); VERIFY (b == -2000);
+ b = a; b.operator*=(ui); VERIFY (b == 5000);
+ b = a; b.operator*=(sl); VERIFY (b == -10000);
+ b = a; b.operator*=(ul); VERIFY (b == 20000);
+ b = a; b.operator*=(sll); VERIFY (b == -25000);
+ b = a; b.operator*=(ull); VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b.operator/=(d32); VERIFY (b == 200);
+ b = a; b.operator/=(d64); VERIFY (b == -100);
+ b = a; b.operator/=(d128); VERIFY (b == 40);
+ b = a; b.operator/=(si); VERIFY (b == -500);
+ b = a; b.operator/=(ui); VERIFY (b == 200);
+ b = a; b.operator/=(sl); VERIFY (b == -100);
+ b = a; b.operator/=(ul); VERIFY (b == 50);
+ b = a; b.operator/=(sll); VERIFY (b == -40);
+ b = a; b.operator/=(ull); VERIFY (b == 20);
+}
+
+void
+compound_assignment_add_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b.operator+=(d32); VERIFY (b == 1005);
+ b = a; b.operator+=(d64); VERIFY (b == 990);
+ b = a; b.operator+=(d128); VERIFY (b == 1025);
+ b = a; b.operator+=(si); VERIFY (b == 998);
+ b = a; b.operator+=(ui); VERIFY (b == 1005);
+ b = a; b.operator+=(sl); VERIFY (b == 990);
+ b = a; b.operator+=(ul); VERIFY (b == 1020);
+ b = a; b.operator+=(sll); VERIFY (b == 975);
+ b = a; b.operator+=(ull); VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b.operator-=(d32); VERIFY (b == 995);
+ b = a; b.operator-=(d64); VERIFY (b == 1010);
+ b = a; b.operator-=(d128); VERIFY (b == 975);
+ b = a; b.operator-=(si); VERIFY (b == 1002);
+ b = a; b.operator-=(ui); VERIFY (b == 995);
+ b = a; b.operator-=(sl); VERIFY (b == 1010);
+ b = a; b.operator-=(ul); VERIFY (b == 980);
+ b = a; b.operator-=(sll); VERIFY (b == 1025);
+ b = a; b.operator-=(ull); VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b.operator*=(d32); VERIFY (b == 5000);
+ b = a; b.operator*=(d64); VERIFY (b == -10000);
+ b = a; b.operator*=(d128); VERIFY (b == 25000);
+ b = a; b.operator*=(si); VERIFY (b == -2000);
+ b = a; b.operator*=(ui); VERIFY (b == 5000);
+ b = a; b.operator*=(sl); VERIFY (b == -10000);
+ b = a; b.operator*=(ul); VERIFY (b == 20000);
+ b = a; b.operator*=(sll); VERIFY (b == -25000);
+ b = a; b.operator*=(ull); VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b.operator/=(d32); VERIFY (b == 200);
+ b = a; b.operator/=(d64); VERIFY (b == -100);
+ b = a; b.operator/=(d128); VERIFY (b == 40);
+ b = a; b.operator/=(si); VERIFY (b == -500);
+ b = a; b.operator/=(ui); VERIFY (b == 200);
+ b = a; b.operator/=(sl); VERIFY (b == -100);
+ b = a; b.operator/=(ul); VERIFY (b == 50);
+ b = a; b.operator/=(sll); VERIFY (b == -40);
+ b = a; b.operator/=(ull); VERIFY (b == 20);
+}
+
+int
+main ()
+{
+ compound_assignment_add_32 ();
+ compound_assignment_subtract_32 ();
+ compound_assignment_multiply_32 ();
+ compound_assignment_divide_32 ();
+
+ compound_assignment_add_64 ();
+ compound_assignment_subtract_64 ();
+ compound_assignment_multiply_64 ();
+ compound_assignment_divide_64 ();
+
+ compound_assignment_add_128 ();
+ compound_assignment_subtract_128 ();
+ compound_assignment_multiply_128 ();
+ compound_assignment_divide_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/compound-assignment.cc b/libstdc++-v3/testsuite/decimal/compound-assignment.cc
new file mode 100644
index 00000000000..2a1f4a7218c
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/compound-assignment.cc
@@ -0,0 +1,248 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.6 Compound assignment (decimal32).
+// ISO/IEC TR 24733 3.2.3.6 Compound assignment (decimal64).
+// ISO/IEC TR 24733 3.2.4.6 Compound assignment (decimal128).
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 d32 (5);
+decimal64 d64 (-10);
+decimal128 d128 (25);
+int si = -2;
+unsigned int ui = 5;
+long sl = -10;
+unsigned long ul = 20;
+long long sll = -25;
+unsigned long long ull = 50;
+
+void
+compound_assignment_add_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b += d32; VERIFY (b == 1005);
+ b = a; b += d64; VERIFY (b == 990);
+ b = a; b += d128; VERIFY (b == 1025);
+ b = a; b += si; VERIFY (b == 998);
+ b = a; b += ui; VERIFY (b == 1005);
+ b = a; b += sl; VERIFY (b == 990);
+ b = a; b += ul; VERIFY (b == 1020);
+ b = a; b += sll; VERIFY (b == 975);
+ b = a; b += ull; VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b -= d32; VERIFY (b == 995);
+ b = a; b -= d64; VERIFY (b == 1010);
+ b = a; b -= d128; VERIFY (b == 975);
+ b = a; b -= si; VERIFY (b == 1002);
+ b = a; b -= ui; VERIFY (b == 995);
+ b = a; b -= sl; VERIFY (b == 1010);
+ b = a; b -= ul; VERIFY (b == 980);
+ b = a; b -= sll; VERIFY (b == 1025);
+ b = a; b -= ull; VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b *= d32; VERIFY (b == 5000);
+ b = a; b *= d64; VERIFY (b == -10000);
+ b = a; b *= d128; VERIFY (b == 25000);
+ b = a; b *= si; VERIFY (b == -2000);
+ b = a; b *= ui; VERIFY (b == 5000);
+ b = a; b *= sl; VERIFY (b == -10000);
+ b = a; b *= ul; VERIFY (b == 20000);
+ b = a; b *= sll; VERIFY (b == -25000);
+ b = a; b *= ull; VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_32 (void)
+{
+ decimal32 a (1000), b;
+
+ b = a; b /= d32; VERIFY (b == 200);
+ b = a; b /= d64; VERIFY (b == -100);
+ b = a; b /= d128; VERIFY (b == 40);
+ b = a; b /= si; VERIFY (b == -500);
+ b = a; b /= ui; VERIFY (b == 200);
+ b = a; b /= sl; VERIFY (b == -100);
+ b = a; b /= ul; VERIFY (b == 50);
+ b = a; b /= sll; VERIFY (b == -40);
+ b = a; b /= ull; VERIFY (b == 20);
+}
+
+void
+compound_assignment_add_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b += d32; VERIFY (b == 1005);
+ b = a; b += d64; VERIFY (b == 990);
+ b = a; b += d128; VERIFY (b == 1025);
+ b = a; b += si; VERIFY (b == 998);
+ b = a; b += ui; VERIFY (b == 1005);
+ b = a; b += sl; VERIFY (b == 990);
+ b = a; b += ul; VERIFY (b == 1020);
+ b = a; b += sll; VERIFY (b == 975);
+ b = a; b += ull; VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b -= d32; VERIFY (b == 995);
+ b = a; b -= d64; VERIFY (b == 1010);
+ b = a; b -= d128; VERIFY (b == 975);
+ b = a; b -= si; VERIFY (b == 1002);
+ b = a; b -= ui; VERIFY (b == 995);
+ b = a; b -= sl; VERIFY (b == 1010);
+ b = a; b -= ul; VERIFY (b == 980);
+ b = a; b -= sll; VERIFY (b == 1025);
+ b = a; b -= ull; VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b *= d32; VERIFY (b == 5000);
+ b = a; b *= d64; VERIFY (b == -10000);
+ b = a; b *= d128; VERIFY (b == 25000);
+ b = a; b *= si; VERIFY (b == -2000);
+ b = a; b *= ui; VERIFY (b == 5000);
+ b = a; b *= sl; VERIFY (b == -10000);
+ b = a; b *= ul; VERIFY (b == 20000);
+ b = a; b *= sll; VERIFY (b == -25000);
+ b = a; b *= ull; VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_64 (void)
+{
+ decimal64 a (1000), b;
+
+ b = a; b /= d32; VERIFY (b == 200);
+ b = a; b /= d64; VERIFY (b == -100);
+ b = a; b /= d128; VERIFY (b == 40);
+ b = a; b /= si; VERIFY (b == -500);
+ b = a; b /= ui; VERIFY (b == 200);
+ b = a; b /= sl; VERIFY (b == -100);
+ b = a; b /= ul; VERIFY (b == 50);
+ b = a; b /= sll; VERIFY (b == -40);
+ b = a; b /= ull; VERIFY (b == 20);
+}
+
+void
+compound_assignment_add_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b += d32; VERIFY (b == 1005);
+ b = a; b += d64; VERIFY (b == 990);
+ b = a; b += d128; VERIFY (b == 1025);
+ b = a; b += si; VERIFY (b == 998);
+ b = a; b += ui; VERIFY (b == 1005);
+ b = a; b += sl; VERIFY (b == 990);
+ b = a; b += ul; VERIFY (b == 1020);
+ b = a; b += sll; VERIFY (b == 975);
+ b = a; b += ull; VERIFY (b == 1050);
+}
+
+void
+compound_assignment_subtract_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b -= d32; VERIFY (b == 995);
+ b = a; b -= d64; VERIFY (b == 1010);
+ b = a; b -= d128; VERIFY (b == 975);
+ b = a; b -= si; VERIFY (b == 1002);
+ b = a; b -= ui; VERIFY (b == 995);
+ b = a; b -= sl; VERIFY (b == 1010);
+ b = a; b -= ul; VERIFY (b == 980);
+ b = a; b -= sll; VERIFY (b == 1025);
+ b = a; b -= ull; VERIFY (b == 950);
+}
+
+void
+compound_assignment_multiply_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b *= d32; VERIFY (b == 5000);
+ b = a; b *= d64; VERIFY (b == -10000);
+ b = a; b *= d128; VERIFY (b == 25000);
+ b = a; b *= si; VERIFY (b == -2000);
+ b = a; b *= ui; VERIFY (b == 5000);
+ b = a; b *= sl; VERIFY (b == -10000);
+ b = a; b *= ul; VERIFY (b == 20000);
+ b = a; b *= sll; VERIFY (b == -25000);
+ b = a; b *= ull; VERIFY (b == 50000);
+}
+
+void
+compound_assignment_divide_128 (void)
+{
+ decimal128 a (1000), b;
+
+ b = a; b /= d32; VERIFY (b == 200);
+ b = a; b /= d64; VERIFY (b == -100);
+ b = a; b /= d128; VERIFY (b == 40);
+ b = a; b /= si; VERIFY (b == -500);
+ b = a; b /= ui; VERIFY (b == 200);
+ b = a; b /= sl; VERIFY (b == -100);
+ b = a; b /= ul; VERIFY (b == 50);
+ b = a; b /= sll; VERIFY (b == -40);
+ b = a; b /= ull; VERIFY (b == 20);
+}
+
+int
+main ()
+{
+ compound_assignment_add_32 ();
+ compound_assignment_subtract_32 ();
+ compound_assignment_multiply_32 ();
+ compound_assignment_divide_32 ();
+
+ compound_assignment_add_64 ();
+ compound_assignment_subtract_64 ();
+ compound_assignment_multiply_64 ();
+ compound_assignment_divide_64 ();
+
+ compound_assignment_add_128 ();
+ compound_assignment_subtract_128 ();
+ compound_assignment_multiply_128 ();
+ compound_assignment_divide_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/conversion-from-float.cc b/libstdc++-v3/testsuite/decimal/conversion-from-float.cc
new file mode 100644
index 00000000000..c1824a827cc
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/conversion-from-float.cc
@@ -0,0 +1,101 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.2 Conversion from floating-point type (decimal32).
+// ISO/IEC TR 24733 3.2.3.2 Conversion from floating-point type (decimal64).
+// ISO/IEC TR 24733 3.2.4.2 Conversion from floating-point type (decimal128).
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+void
+conversion_from_float_32 ()
+{
+ decimal32 d32(123);
+ decimal64 d64(234);
+ decimal128 d128(345);
+ float f = 456.F;
+ double d = 567.;
+ long double ld = 678.L;
+
+ d32 = (decimal32) d64;
+ VERIFY (d32 == make_decimal32 (234LL, 0));
+ d32 = (decimal32) d128;
+ VERIFY (d32 == make_decimal32 (345LL, 0));
+ d32 = (decimal32) f;
+ VERIFY (d32 == make_decimal32 (456LL, 0));
+ d32 = (decimal32) d;
+ VERIFY (d32 == make_decimal32 (567LL, 0));
+ d32 = (decimal32) ld;
+ VERIFY (d32 == make_decimal32 (678LL, 0));
+}
+
+void
+conversion_from_float_64 ()
+{
+ decimal32 d32(123);
+ decimal64 d64(234);
+ decimal128 d128(345);
+ float f = 456.F;
+ double d = 567.;
+ long double ld = 678.L;
+
+ d64 = d32;
+ VERIFY (d64 == make_decimal64 (123LL, 0));
+ d64 = (decimal64) d128;
+ VERIFY (d64 == make_decimal64 (345LL, 0));
+ d64 = (decimal64) f;
+ VERIFY (d64 == make_decimal64 (456LL, 0));
+ d64 = (decimal64) d;
+ VERIFY (d64 == make_decimal64 (567LL, 0));
+ d64 = (decimal64) ld;
+ VERIFY (d64 == make_decimal64 (678LL, 0));
+}
+
+void
+conversion_from_float_128 ()
+{
+ decimal32 d32(123);
+ decimal64 d64(234);
+ decimal128 d128(345);
+ float f = 456.F;
+ double d = 567.;
+ long double ld = 678.L;
+
+ d128 = d32;
+ VERIFY (d128 == make_decimal128 (123LL, 0));
+ d128 = d64;
+ VERIFY (d128 == make_decimal128 (234LL, 0));
+ d128 = (decimal128) f;
+ VERIFY (d128 == make_decimal128 (456LL, 0));
+ d128 = (decimal128) d;
+ VERIFY (d128 == make_decimal128 (567LL, 0));
+ d128 = (decimal128) ld;
+ VERIFY (d128 == make_decimal128 (678LL, 0));
+}
+
+int
+main ()
+{
+ conversion_from_float_32 ();
+ conversion_from_float_64 ();
+ conversion_from_float_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/conversion-from-integral.cc b/libstdc++-v3/testsuite/decimal/conversion-from-integral.cc
new file mode 100644
index 00000000000..78d5eb76a79
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/conversion-from-integral.cc
@@ -0,0 +1,193 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.3 Conversion from integral type (decimal32).
+// ISO/IEC TR 24733 3.2.3.3 Conversion from integral type (decimal64).
+// ISO/IEC TR 24733 3.2.4.3 Conversion from integral type (decimal128).
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+void
+conversion_from_integral_p32 ()
+{
+ decimal32 d;
+ decimal32 from_si (1);
+ decimal32 from_ui (2U);
+ decimal32 from_sl (3L);
+ decimal32 from_ul (4UL);
+ decimal32 from_sll (5LL);
+ decimal32 from_ull (6ULL);
+
+ d++; VERIFY (from_si == d);
+ d++; VERIFY (from_ui == d);
+ d++; VERIFY (from_sl == d);
+ d++; VERIFY (from_ul == d);
+ d++; VERIFY (from_sll == d);
+ d++; VERIFY (from_ull == d);
+
+ from_si = 7;
+ d++; VERIFY (from_si == d);
+ from_ui = 8U;
+ d++; VERIFY (from_ui == d);
+ from_sl = 9L;
+ d++; VERIFY (from_sl == d);
+ from_ul = 10UL;
+ d++; VERIFY (from_ul == d);
+ from_sll = 11LL;
+ d++; VERIFY (from_sll == d);
+ from_ull = 12ULL;
+ d++; VERIFY (from_ull == d);
+}
+
+void
+conversion_from_integral_m32 ()
+{
+ decimal32 d;
+ decimal32 from_si (-1);
+ decimal32 from_sl (-2L);
+ decimal32 from_sll (-3LL);
+
+ d--; VERIFY (from_si == d);
+ d--; VERIFY (from_sl == d);
+ d--; VERIFY (from_sll == d);
+
+ from_si = -4;
+ d--; VERIFY (from_si == d);
+ from_sl = -5L;
+ d--; VERIFY (from_sl == d);
+ from_sll = -6LL;
+ d--; VERIFY (from_sll == d);
+}
+
+void
+conversion_from_integral_p64 ()
+{
+ decimal64 d;
+ decimal64 from_si (1);
+ decimal64 from_ui (2U);
+ decimal64 from_sl (3L);
+ decimal64 from_ul (4UL);
+ decimal64 from_sll (5LL);
+ decimal64 from_ull (6ULL);
+
+ d++; VERIFY (from_si == d);
+ d++; VERIFY (from_ui == d);
+ d++; VERIFY (from_sl == d);
+ d++; VERIFY (from_ul == d);
+ d++; VERIFY (from_sll == d);
+ d++; VERIFY (from_ull == d);
+
+ from_si = 7;
+ d++; VERIFY (from_si == d);
+ from_ui = 8U;
+ d++; VERIFY (from_ui == d);
+ from_sl = 9L;
+ d++; VERIFY (from_sl == d);
+ from_ul = 10UL;
+ d++; VERIFY (from_ul == d);
+ from_sll = 11LL;
+ d++; VERIFY (from_sll == d);
+ from_ull = 12ULL;
+ d++; VERIFY (from_ull == d);
+}
+
+void
+conversion_from_integral_m64 ()
+{
+ decimal64 d;
+ decimal64 from_si (-1);
+ decimal64 from_sl (-2L);
+ decimal64 from_sll (-3LL);
+
+ d--; VERIFY (from_si == d);
+ d--; VERIFY (from_sl == d);
+ d--; VERIFY (from_sll == d);
+
+ from_si = -4;
+ d--; VERIFY (from_si == d);
+ from_sl = -5L;
+ d--; VERIFY (from_sl == d);
+ from_sll = -6LL;
+ d--; VERIFY (from_sll == d);
+}
+
+void
+conversion_from_integral_p128 ()
+{
+ decimal128 d;
+ decimal128 from_si (1);
+ decimal128 from_ui (2U);
+ decimal128 from_sl (3L);
+ decimal128 from_ul (4UL);
+ decimal128 from_sll (5LL);
+ decimal128 from_ull (6ULL);
+
+ d++; VERIFY (from_si == d);
+ d++; VERIFY (from_ui == d);
+ d++; VERIFY (from_sl == d);
+ d++; VERIFY (from_ul == d);
+ d++; VERIFY (from_sll == d);
+ d++; VERIFY (from_ull == d);
+
+ from_si = 7;
+ d++; VERIFY (from_si == d);
+ from_ui = 8U;
+ d++; VERIFY (from_ui == d);
+ from_sl = 9L;
+ d++; VERIFY (from_sl == d);
+ from_ul = 10UL;
+ d++; VERIFY (from_ul == d);
+ from_sll = 11LL;
+ d++; VERIFY (from_sll == d);
+ from_ull = 12ULL;
+}
+
+void
+conversion_from_integral_m128 ()
+{
+ decimal128 d;
+ decimal128 from_si (-1);
+ decimal128 from_sl (-2L);
+ decimal128 from_sll (-3LL);
+
+ d--; VERIFY (from_si == d);
+ d--; VERIFY (from_sl == d);
+ d--; VERIFY (from_sll == d);
+
+ from_si = -4;
+ d--; VERIFY (from_si == d);
+ from_sl = -5L;
+ d--; VERIFY (from_sl == d);
+ from_sll = -6LL;
+ d--; VERIFY (from_sll == d);
+}
+
+int
+main ()
+{
+ conversion_from_integral_p32 ();
+ conversion_from_integral_m32 ();
+ conversion_from_integral_p64 ();
+ conversion_from_integral_m64 ();
+ conversion_from_integral_p128 ();
+ conversion_from_integral_m128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/conversion-to-generic-float.cc b/libstdc++-v3/testsuite/decimal/conversion-to-generic-float.cc
new file mode 100644
index 00000000000..bac0c820ee6
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/conversion-to-generic-float.cc
@@ -0,0 +1,105 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.6 Conversion to generic floating-point type.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+void
+conversion_to_generic_float_32 ()
+{
+ std::decimal::decimal32 d32(123);
+ float f;
+ double d;
+ long double ld;
+
+ f = decimal32_to_float (d32);
+ VERIFY (f == 123.F);
+ d = decimal32_to_double (d32);
+ VERIFY (d == 123.);
+ ld = decimal32_to_long_double (d32);
+ VERIFY (ld == 123.L);
+
+ d32++;
+ f = decimal_to_float (d32);
+ VERIFY (f == 124.F);
+ d = decimal_to_double (d32);
+ VERIFY (d == 124.);
+ ld = decimal_to_long_double (d32);
+ VERIFY (ld == 124.L);
+}
+
+void
+conversion_to_generic_float_64 ()
+{
+ std::decimal::decimal64 d64(234);
+ float f;
+ double d;
+ long double ld;
+
+ f = decimal64_to_float (d64);
+ VERIFY (f == 234.F);
+ d = decimal64_to_double (d64);
+ VERIFY (d == 234.);
+ ld = decimal64_to_long_double (d64);
+ VERIFY (ld == 234.L);
+
+ d64++;
+ f = decimal_to_float (d64);
+ VERIFY (f == 235.F);
+ d = decimal_to_double (d64);
+ VERIFY (d == 235.);
+ ld = decimal_to_long_double (d64);
+ VERIFY (ld == 235.L);
+}
+
+void
+conversion_to_generic_float_128 ()
+{
+ std::decimal::decimal128 d128(345);
+ float f;
+ double d;
+ long double ld;
+
+ f = decimal128_to_float (d128);
+ VERIFY (f == 345.F);
+ d = decimal128_to_double (d128);
+ VERIFY (d == 345.);
+ ld = decimal128_to_long_double (d128);
+ VERIFY (ld == 345.L);
+
+ d128++;
+ f = decimal_to_float (d128);
+ VERIFY (f == 346.F);
+ d = decimal_to_double (d128);
+ VERIFY (d == 346.);
+ ld = decimal_to_long_double (d128);
+ VERIFY (ld == 346.L);
+}
+
+int
+main ()
+{
+ conversion_to_generic_float_32 ();
+ conversion_to_generic_float_64 ();
+ conversion_to_generic_float_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/conversion-to-integral.cc b/libstdc++-v3/testsuite/decimal/conversion-to-integral.cc
new file mode 100644
index 00000000000..9322c1bc78f
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/conversion-to-integral.cc
@@ -0,0 +1,85 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.4 Conversion to integral type (decimal32).
+// ISO/IEC TR 24733 3.2.3.4 Conversion to integral type (decimal64).
+// ISO/IEC TR 24733 3.2.4.4 Conversion to integral type (decimal128).
+
+#include <decimal/decimal>
+#include <climits>
+#include <cstdio>
+#include <testsuite_hooks.h>
+
+// Use extension to replace implicit long long conversion with function call.
+#define LONGLONG(X) decimal_to_long_long(X)
+
+using namespace std::decimal;
+
+void
+conversion_to_integral_32 (void)
+{
+ #undef MAXVAL
+ #define MAXVAL 999999LL
+ decimal32 a, b (1), c (-1), d (MAXVAL), e (-MAXVAL);
+ long long ll;
+
+ ll = LONGLONG (a); VERIFY (ll == 0LL);
+ ll = LONGLONG (b); VERIFY (ll == 1LL);
+ ll = LONGLONG (c); VERIFY (ll == -1LL);
+ ll = LONGLONG (d); VERIFY (ll == MAXVAL);
+ ll = LONGLONG (e); VERIFY (ll == -MAXVAL);
+}
+
+void
+conversion_to_integral_64 (void)
+{
+ #undef MAXVAL
+ #define MAXVAL 999999999999999LL
+ decimal64 a, b (1), c (-1), d (MAXVAL), e (-MAXVAL);
+ long long ll;
+
+ ll = LONGLONG (a); VERIFY (ll == 0LL);
+ ll = LONGLONG (b); VERIFY (ll == 1LL);
+ ll = LONGLONG (c); VERIFY (ll == -1LL);
+ ll = LONGLONG (d); VERIFY (ll == MAXVAL);
+ ll = LONGLONG (e); VERIFY (ll == -MAXVAL);
+}
+
+void
+conversion_to_integral_128 (void)
+{
+ #undef MAXVAL
+ #define MAXVAL LONG_LONG_MAX
+ decimal128 a, b (1), c (-1), d (MAXVAL), e (-MAXVAL);
+ long long ll;
+
+ ll = LONGLONG (a); VERIFY (ll == 0LL);
+ ll = LONGLONG (b); VERIFY (ll == 1LL);
+ ll = LONGLONG (c); VERIFY (ll == -1LL);
+ ll = LONGLONG (d); VERIFY (ll == MAXVAL);
+ ll = LONGLONG (e); VERIFY (ll == -MAXVAL);
+}
+
+int
+main ()
+{
+ conversion_to_integral_32 ();
+ conversion_to_integral_64 ();
+ conversion_to_integral_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/ctor.cc b/libstdc++-v3/testsuite/decimal/ctor.cc
new file mode 100644
index 00000000000..84e04ade691
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/ctor.cc
@@ -0,0 +1,65 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.1 Construct/copy/destroy (decimal32).
+// ISO/IEC TR 24733 3.2.3.1 Construct/copy/destroy (decimal64).
+// ISO/IEC TR 24733 3.2.4.1 Construct/copy/destroy (decimal128).
+
+// Test the default constructor.
+
+#include <decimal/decimal>
+#include <cstring>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+void
+ctor_32 (void)
+{
+ decimal32 a;
+ float b __attribute__((mode(SD))) = 0.e-101DF;
+
+ VERIFY (memcmp (&a, &b, 4) == 0);
+}
+
+void
+ctor_64 (void)
+{
+ decimal64 a;
+ float b __attribute__((mode(DD))) = 0.e-398DD;
+
+ VERIFY (memcmp (&a, &b, 8) == 0);
+}
+
+void
+ctor_128 (void)
+{
+ decimal128 a;
+ float b __attribute__((mode(TD))) = 0.e-6176DL;
+
+ VERIFY (memcmp (&a, &b, 16) == 0);
+}
+
+int
+main ()
+{
+ ctor_32 ();
+ ctor_64 ();
+ ctor_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/incdec-memfunc.cc b/libstdc++-v3/testsuite/decimal/incdec-memfunc.cc
new file mode 100644
index 00000000000..f2d1178a6f1
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/incdec-memfunc.cc
@@ -0,0 +1,181 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.5 Increment and decrement operators (decimal32).
+// ISO/IEC TR 24733 3.2.3.5 Increment and decrement operators (decimal64).
+// ISO/IEC TR 24733 3.2.4.5 Increment and decrement operators (decimal128).
+
+// Access member functions directly.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+// Use extension to replace implicit long long conversion with function call.
+#define LONGLONG(X) decimal_to_long_long(X)
+
+using namespace std::decimal;
+
+void
+incdec32 (void)
+{
+ int ival;
+ std::decimal::decimal32 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ b.operator++();
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator++(1);
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator--();
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b.operator--(1);
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = b.operator++();
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b.operator++(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = b.operator--();
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b.operator--(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+void
+incdec64 (void)
+{
+ int ival;
+ std::decimal::decimal64 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ b.operator++();
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator++(1);
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator--();
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b.operator--(1);
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = b.operator++();
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b.operator++(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = b.operator--();
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b.operator--(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+void
+incdec128 (void)
+{
+ int ival;
+ std::decimal::decimal128 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ b.operator++();
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator++(1);
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b.operator--();
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b.operator--(1);
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = b.operator++();
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b.operator++(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = b.operator--();
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b.operator--(1);
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+int
+main ()
+{
+ incdec32 ();
+ incdec64 ();
+ incdec128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/incdec.cc b/libstdc++-v3/testsuite/decimal/incdec.cc
new file mode 100644
index 00000000000..45211b1de21
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/incdec.cc
@@ -0,0 +1,179 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.2.5 Increment and decrement operators (decimal32).
+// ISO/IEC TR 24733 3.2.3.5 Increment and decrement operators (decimal64).
+// ISO/IEC TR 24733 3.2.4.5 Increment and decrement operators (decimal128).
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+// Use extension to replace implicit long long conversion with function call.
+#define LONGLONG(X) decimal_to_long_long(X)
+
+using namespace std::decimal;
+
+void
+incdec32 (void)
+{
+ int ival;
+ std::decimal::decimal32 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ ++b;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b++;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ --b;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b--;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = ++b;
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b++;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = --b;
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b--;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+void
+incdec64 (void)
+{
+ int ival;
+ std::decimal::decimal64 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ ++b;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b++;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ --b;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b--;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = ++b;
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b++;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = --b;
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b--;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+void
+incdec128 (void)
+{
+ int ival;
+ std::decimal::decimal128 a(11), b, c;
+
+ // Verify that we get the expected value of b after assignment.
+ b = a;
+ ival = LONGLONG (b); VERIFY (ival == 11);
+
+ // Check that the increment and decrement operators change the value
+ // of the original class.
+ b = a;
+ ++b;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ b++;
+ ival = LONGLONG (b); VERIFY (ival == 12);
+
+ b = a;
+ --b;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ b = a;
+ b--;
+ ival = LONGLONG (b); VERIFY (ival == 10);
+
+ // Check that the increment and decrement operators return the
+ // correct value.
+ b = a;
+ c = ++b;
+ ival = LONGLONG (c); VERIFY (ival == 12);
+
+ b = a;
+ c = b++;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+
+ b = a;
+ c = --b;
+ ival = LONGLONG (c); VERIFY (ival == 10);
+
+ b = a;
+ c = b--;
+ ival = LONGLONG (c); VERIFY (ival == 11);
+}
+
+int
+main ()
+{
+ incdec32 ();
+ incdec64 ();
+ incdec128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/make-decimal.cc b/libstdc++-v3/testsuite/decimal/make-decimal.cc
new file mode 100644
index 00000000000..be4fa4632ad
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/make-decimal.cc
@@ -0,0 +1,132 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.5 Initialization from coefficient and exponent.
+
+#include <decimal/decimal>
+#include <cstring>
+#include <testsuite_hooks.h>
+
+#define PASTE2(A,B) A ## B
+#define PASTE(A,B) PASTE2(A,B)
+
+#define TESTVAL_NEG(COEFF,ESIGN,EXP,SUF,NUM,SIZE) \
+ x = PASTE(PASTE(PASTE(PASTE(PASTE(COEFF,.),E),ESIGN),EXP),SUF); \
+ sll = PASTE(COEFF,LL); \
+ i = ESIGN EXP; \
+ a = PASTE(make_decimal,32) (sll, i); \
+ b = PASTE(make_decimal,32) (PASTE(COEFF,LL), ESIGN EXP); \
+ VERIFY ((__builtin_memcmp ((void *)&x, (void *)&a, SIZE) == 0) \
+ && (__builtin_memcmp ((void *)&x, (void *)&b,SIZE) == 0));
+
+#define TESTVAL_NONNEG(COEFF,ESIGN,EXP,SUF,NUM,SIZE) \
+ x = PASTE(PASTE(PASTE(PASTE(PASTE(COEFF,.),E),ESIGN),EXP),SUF); \
+ sll = PASTE(COEFF,LL); \
+ ull = PASTE(COEFF,ULL); \
+ i = ESIGN EXP; \
+ a = PASTE(make_decimal,32) (sll, i); \
+ b = PASTE(make_decimal,32) (PASTE(COEFF,LL), ESIGN EXP); \
+ c = PASTE(make_decimal,32) (ull, i); \
+ d = PASTE(make_decimal,32) (PASTE(COEFF,ULL), ESIGN EXP); \
+ VERIFY ((__builtin_memcmp ((void *)&x, (void *)&a, SIZE) == 0) \
+ && (__builtin_memcmp ((void *)&x, (void *)&b,SIZE) == 0) \
+ && (__builtin_memcmp ((void *)&x, (void *)&c,SIZE) == 0) \
+ && (__builtin_memcmp ((void *)&x, (void *)&d,SIZE) == 0));
+
+using namespace std::decimal;
+
+void
+make_decimal_32 (void)
+{
+ decimal32 a, b, c, d;
+ float x __attribute__((mode(SD)));
+ int i;
+ unsigned long sz = sizeof (decimal32);
+ volatile long long sll;
+ volatile unsigned long long ull;
+
+ TESTVAL_NONNEG (0, +, 0, DF, 32, sz);
+ TESTVAL_NONNEG (5, +, 1, DF, 32, sz);
+ TESTVAL_NONNEG (50, +, 0, DF, 32, sz);
+ TESTVAL_NONNEG (500, +, 0, DF, 32, sz);
+ TESTVAL_NEG (-25, -, 3, DF, 32, sz)
+ TESTVAL_NEG (-500, +, 0, DF, 32, sz);
+ TESTVAL_NONNEG (999999, +, 91, DF, 32, sz);
+ TESTVAL_NONNEG (1, -, 9, DF, 32, sz);
+ TESTVAL_NONNEG (1, -, 90, DF, 32, sz);
+ TESTVAL_NONNEG (1, -, 95, DF, 32, sz);
+ TESTVAL_NONNEG (1, -, 101, DF, 32, sz);
+ TESTVAL_NEG (-1, -, 101, DF, 32, sz);
+}
+
+void
+make_decimal_64 (void)
+{
+ decimal64 a, b, c, d;
+ float x __attribute__((mode(DD)));
+ int i;
+ unsigned long sz = sizeof (decimal64);
+ volatile long long sll;
+ volatile unsigned long long ull;
+
+ TESTVAL_NONNEG (0, +, 0, DF, 64, sz);
+ TESTVAL_NONNEG (5, +, 1, DF, 64, sz);
+ TESTVAL_NONNEG (50, +, 0, DF, 64, sz);
+ TESTVAL_NONNEG (500, +, 0, DF, 64, sz);
+ TESTVAL_NEG (-25, -, 3, DF, 64, sz)
+ TESTVAL_NEG (-500, +, 0, DF, 64, sz);
+ TESTVAL_NONNEG (999999, +, 91, DF, 64, sz);
+ TESTVAL_NONNEG (1, -, 9, DF, 64, sz);
+ TESTVAL_NONNEG (1, -, 90, DF, 64, sz);
+ TESTVAL_NONNEG (1, -, 95, DF, 64, sz);
+ TESTVAL_NONNEG (1, -, 101, DF, 64, sz);
+ TESTVAL_NEG (-1, -, 101, DF, 64, sz);
+}
+
+void
+make_decimal_128 (void)
+{
+ decimal128 a, b, c, d;
+ float x __attribute__((mode(TD)));
+ int i;
+ unsigned long sz = sizeof (decimal128);
+ volatile long long sll;
+ volatile unsigned long long ull;
+
+ TESTVAL_NONNEG (0, +, 0, DF, 128, sz);
+ TESTVAL_NONNEG (5, +, 1, DF, 128, sz);
+ TESTVAL_NONNEG (50, +, 0, DF, 128, sz);
+ TESTVAL_NONNEG (500, +, 0, DF, 128, sz);
+ TESTVAL_NEG (-25, -, 3, DF, 128, sz)
+ TESTVAL_NEG (-500, +, 0, DF, 128, sz);
+ TESTVAL_NONNEG (999999, +, 91, DF, 128, sz);
+ TESTVAL_NONNEG (1, -, 9, DF, 128, sz);
+ TESTVAL_NONNEG (1, -, 90, DF, 128, sz);
+ TESTVAL_NONNEG (1, -, 95, DF, 128, sz);
+ TESTVAL_NONNEG (1, -, 101, DF, 128, sz);
+ TESTVAL_NEG (-1, -, 101, DF, 128, sz);
+}
+
+int
+main ()
+{
+ make_decimal_32 ();
+ make_decimal_64 ();
+ make_decimal_128 ();
+}
diff --git a/libstdc++-v3/testsuite/decimal/mixed-mode_neg.cc b/libstdc++-v3/testsuite/decimal/mixed-mode_neg.cc
new file mode 100644
index 00000000000..7f9da43ed43
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/mixed-mode_neg.cc
@@ -0,0 +1,206 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile }
+// { dg-require-effective-target dfp }
+
+// Test that binary operators do not accept mixed decimal and generic
+// floating-point operands. This isn't explicity prohibited in
+// ISO/IEC TR 24733 but it is prohibited in C, and in C++ there should
+// not be an implicit conversion from a decimal floating-point type to
+// a generic floating-point type.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 a32, b32, c32;
+decimal64 a64, b64, c64;
+decimal128 a128, b128, c128;
+float f;
+double d;
+long double ld;
+bool b1, b2, b3, b4, b5, b6;
+
+void
+bad_add (void)
+{
+ a32 = b32 + f; // { dg-error "error" }
+ a32 = ld + b32; // { dg-error "error" }
+ a64 = b64 + d; // { dg-error "error" }
+ a64 = ld + b64; // { dg-error "error" }
+ a128 = b128 + ld; // { dg-error "error" }
+ a128 = d + b128; // { dg-error "error" }
+}
+
+void
+bad_subtract (void)
+{
+ a32 = b32 - f; // { dg-error "error" }
+ a32 = ld - b32; // { dg-error "error" }
+ a64 = b64 - d; // { dg-error "error" }
+ a64 = ld - b64; // { dg-error "error" }
+ a128 = b128 - ld; // { dg-error "error" }
+ a128 = d - b128; // { dg-error "error" }
+}
+
+void
+bad_multiply (void)
+{
+ a32 = b32 * f; // { dg-error "error" }
+ a32 = ld * b32; // { dg-error "error" }
+ a64 = b64 * d; // { dg-error "error" }
+ a64 = ld * b64; // { dg-error "error" }
+ a128 = b128 * ld; // { dg-error "error" }
+ a128 = d * b128; // { dg-error "error" }
+}
+
+void
+bad_divide (void)
+{
+ a32 = b32 / f; // { dg-error "error" }
+ a32 = ld / b32; // { dg-error "error" }
+ a64 = b64 / d; // { dg-error "error" }
+ a64 = ld / b64; // { dg-error "error" }
+ a128 = b128 / ld; // { dg-error "error" }
+ a128 = d / b128; // { dg-error "error" }
+}
+
+void
+bad_eq (void)
+{
+ b1 = b32 == f; // { dg-error "error" }
+ b2 = ld == b32; // { dg-error "error" }
+ b3 = b64 == d; // { dg-error "error" }
+ b4 = ld == b64; // { dg-error "error" }
+ b5 = b128 == ld; // { dg-error "error" }
+ b6 = d == b128; // { dg-error "error" }
+}
+
+void
+bad_ne (void)
+{
+ b1 = b32 != f; // { dg-error "error" }
+ b2 = ld != b32; // { dg-error "error" }
+ b3 = b64 != d; // { dg-error "error" }
+ b4 = ld != b64; // { dg-error "error" }
+ b5 = b128 != ld; // { dg-error "error" }
+ b6 = d != b128; // { dg-error "error" }
+}
+
+void
+bad_lt (void)
+{
+ b1 = b32 < f; // { dg-error "error" }
+ b2 = ld < b32; // { dg-error "error" }
+ b3 = b64 < d; // { dg-error "error" }
+ b4 = ld < b64; // { dg-error "error" }
+ b5 = b128 < ld; // { dg-error "error" }
+ b6 = d < b128; // { dg-error "error" }
+}
+
+void
+bad_le (void)
+{
+ b1 = b32 <= f; // { dg-error "error" }
+ b2 = ld <= b32; // { dg-error "error" }
+ b3 = b64 <= d; // { dg-error "error" }
+ b4 = ld <= b64; // { dg-error "error" }
+ b5 = b128 <= ld; // { dg-error "error" }
+ b6 = d <= b128; // { dg-error "error" }
+}
+
+void
+bad_gt (void)
+{
+ b1 = b32 > f; // { dg-error "error" }
+ b2 = ld > b32; // { dg-error "error" }
+ b3 = b64 > d; // { dg-error "error" }
+ b4 = ld > b64; // { dg-error "error" }
+ b5 = b128 > ld; // { dg-error "error" }
+ b6 = d > b128; // { dg-error "error" }
+}
+
+void
+bad_ge (void)
+{
+ b1 = b32 >= f; // { dg-error "error" }
+ b2 = ld >= b32; // { dg-error "error" }
+ b3 = b64 >= d; // { dg-error "error" }
+ b4 = ld >= b64; // { dg-error "error" }
+ b5 = b128 >= ld; // { dg-error "error" }
+ b6 = d >= b128; // { dg-error "error" }
+}
+
+void
+bad_pluseq (void)
+{
+ a32 += f; // { dg-error "error" }
+ a32 += d; // { dg-error "error" }
+ a32 += ld; // { dg-error "error" }
+ a64 += f; // { dg-error "error" }
+ a64 += d; // { dg-error "error" }
+ a64 += ld; // { dg-error "error" }
+ a128 += f; // { dg-error "error" }
+ a128 += d; // { dg-error "error" }
+ a128 += ld; // { dg-error "error" }
+}
+
+void
+bad_minuseq (void)
+{
+ a32 -= f; // { dg-error "error" }
+ a32 -= d; // { dg-error "error" }
+ a32 -= ld; // { dg-error "error" }
+ a64 -= f; // { dg-error "error" }
+ a64 -= d; // { dg-error "error" }
+ a64 -= ld; // { dg-error "error" }
+ a128 -= f; // { dg-error "error" }
+ a128 -= d; // { dg-error "error" }
+ a128 -= ld; // { dg-error "error" }
+}
+
+void
+bad_timeseq (void)
+{
+ a32 *= f; // { dg-error "error" }
+ a32 *= d; // { dg-error "error" }
+ a32 *= ld; // { dg-error "error" }
+ a64 *= f; // { dg-error "error" }
+ a64 *= d; // { dg-error "error" }
+ a64 *= ld; // { dg-error "error" }
+ a128 *= f; // { dg-error "error" }
+ a128 *= d; // { dg-error "error" }
+ a128 *= ld; // { dg-error "error" }
+}
+
+void
+bad_divideeq (void)
+{
+ a32 /= f; // { dg-error "error" }
+ a32 /= d; // { dg-error "error" }
+ a32 /= ld; // { dg-error "error" }
+ a64 /= f; // { dg-error "error" }
+ a64 /= d; // { dg-error "error" }
+ a64 /= ld; // { dg-error "error" }
+ a128 /= f; // { dg-error "error" }
+ a128 /= d; // { dg-error "error" }
+ a128 /= ld; // { dg-error "error" }
+}
+
+// { dg-excess-errors "notes about candidates" }
diff --git a/libstdc++-v3/testsuite/decimal/operator_neg.cc b/libstdc++-v3/testsuite/decimal/operator_neg.cc
new file mode 100644
index 00000000000..fff81d1c06f
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/operator_neg.cc
@@ -0,0 +1,160 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile }
+// { dg-require-effective-target dfp }
+
+// Test that C++ binary operators that are restricted to integer operands
+// do not accept decimal float operands.
+
+#include <decimal/decimal>
+
+using namespace std::decimal;
+
+decimal32 a32, b32, c32;
+decimal64 a64, b64, c64;
+decimal128 a128, b128, c128;
+
+void
+modulus (void)
+{
+ a32 = b32 % c32; // { dg-error "error" }
+ a64 = b64 % c64; // { dg-error "error" }
+ a128 = b128 % c128; // { dg-error "error" }
+ a128 = b32 % c128; // { dg-error "error" }
+ a128 = b64 % c128; // { dg-error "error" }
+ a32 = 100 % c32; // { dg-error "error" }
+ a64 = 10 % c64; // { dg-error "error" }
+ a128 = 1000 % c128; // { dg-error "error" }
+ a32 = b32 % 7; // { dg-error "error" }
+ a64 = b64 % 5; // { dg-error "error" }
+ a128 = b128 % 3; // { dg-error "error" }
+}
+
+void
+bitwise_right_shift (void)
+{
+ a32 = b32 >> c32; // { dg-error "error" }
+ a64 = b64 >> c64; // { dg-error "error" }
+ a128 = b128 >> c128; // { dg-error "error" }
+ a128 = b32 >> c128; // { dg-error "error" }
+ a128 = b64 >> c128; // { dg-error "error" }
+ a32 = 100 >> c32; // { dg-error "error" }
+ a64 = 10 >> c64; // { dg-error "error" }
+ a128 = 1000 >> c128; // { dg-error "error" }
+ a32 = b32 >> 7; // { dg-error "error" }
+ a64 = b64 >> 5; // { dg-error "error" }
+ a128 = b128 >> 3; // { dg-error "error" }
+}
+
+void
+bitwise_left_shift (void)
+{
+ a32 = b32 << c32; // { dg-error "error" }
+ a64 = b64 << c64; // { dg-error "error" }
+ a128 = b128 << c128; // { dg-error "error" }
+ a128 = b32 << c128; // { dg-error "error" }
+ a128 = b64 << c128; // { dg-error "error" }
+ a32 = 100 << c32; // { dg-error "error" }
+ a64 = 10 << c64; // { dg-error "error" }
+ a128 = 1000 << c128; // { dg-error "error" }
+ a32 = b32 << 7; // { dg-error "error" }
+ a64 = b64 << 5; // { dg-error "error" }
+ a128 = b128 << 3; // { dg-error "error" }
+}
+
+void
+bitwise_exclusive_or (void)
+{
+ a32 = b32 ^ c32; // { dg-error "error" }
+ a64 = b64 ^ c64; // { dg-error "error" }
+ a128 = b128 ^ c128; // { dg-error "error" }
+ a128 = b32 ^ c128; // { dg-error "error" }
+ a128 = b64 ^ c128; // { dg-error "error" }
+ a32 = 100 ^ c32; // { dg-error "error" }
+ a64 = 10 ^ c64; // { dg-error "error" }
+ a128 = 1000 ^ c128; // { dg-error "error" }
+ a32 = b32 ^ 7; // { dg-error "error" }
+ a64 = b64 ^ 5; // { dg-error "error" }
+ a128 = b128 ^ 3; // { dg-error "error" }
+}
+
+void
+bitwise_inclusive_or (void)
+{
+ a32 = b32 | c32; // { dg-error "error" }
+ a64 = b64 | c64; // { dg-error "error" }
+ a128 = b128 | c128; // { dg-error "error" }
+ a128 = b32 | c128; // { dg-error "error" }
+ a128 = b64 | c128; // { dg-error "error" }
+ a32 = 100 | c32; // { dg-error "error" }
+ a64 = 10 | c64; // { dg-error "error" }
+ a128 = 1000 | c128; // { dg-error "error" }
+ a32 = b32 | 7; // { dg-error "error" }
+ a64 = b64 | 5; // { dg-error "error" }
+ a128 = b128 | 3; // { dg-error "error" }
+}
+
+void
+logical_and (void)
+{
+ a32 = b32 && c32; // { dg-error "error" }
+ a64 = b64 && c64; // { dg-error "error" }
+ a128 = b128 && c128; // { dg-error "error" }
+ a128 = b32 && c128; // { dg-error "error" }
+ a128 = b64 && c128; // { dg-error "error" }
+ a32 = 100 && c32; // { dg-error "error" }
+ a64 = 10 && c64; // { dg-error "error" }
+ a128 = 1000 && c128; // { dg-error "error" }
+ a32 = b32 && 7; // { dg-error "error" }
+ a64 = b64 && 5; // { dg-error "error" }
+ a128 = b128 && 3; // { dg-error "error" }
+}
+
+void
+logical_or (void)
+{
+ a32 = b32 || c32; // { dg-error "error" }
+ a64 = b64 || c64; // { dg-error "error" }
+ a128 = b128 || c128; // { dg-error "error" }
+ a128 = b32 || c128; // { dg-error "error" }
+ a128 = b64 || c128; // { dg-error "error" }
+ a32 = 100 || c32; // { dg-error "error" }
+ a64 = 10 || c64; // { dg-error "error" }
+ a128 = 1000 || c128; // { dg-error "error" }
+ a32 = b32 || 7; // { dg-error "error" }
+ a64 = b64 || 5; // { dg-error "error" }
+ a128 = b128 || 3; // { dg-error "error" }
+}
+
+void
+bitwise_complement (void)
+{
+ a32 = ~b32; // { dg-error "error" }
+ a64 = ~b64; // { dg-error "error" }
+ a128 = ~b128; // { dg-error "error" }
+}
+
+void
+logical_not (void)
+{
+ a32 = !b32; // { dg-error "error" }
+ a64 = !b64; // { dg-error "error" }
+ a128 = !b128; // { dg-error "error" }
+}
+
+// { dg-excess-errors "" { target *-*-* } }
diff --git a/libstdc++-v3/testsuite/decimal/unary-arith.cc b/libstdc++-v3/testsuite/decimal/unary-arith.cc
new file mode 100644
index 00000000000..d32b98d0d51
--- /dev/null
+++ b/libstdc++-v3/testsuite/decimal/unary-arith.cc
@@ -0,0 +1,93 @@
+// Copyright (C) 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-effective-target dfp }
+
+// ISO/IEC TR 24733 3.2.7 Unary arithmetic operators.
+
+#include <decimal/decimal>
+#include <testsuite_hooks.h>
+
+using namespace std::decimal;
+
+decimal32 a32 (20), b32 (-20);
+decimal64 a64 (124), b64 (-124);
+decimal128 a128 (5001), b128 (-5001);
+
+void
+unary_plus_32 (void)
+{
+ decimal32 a;
+
+ a = +a32; VERIFY (a == a32);
+ a = +b32; VERIFY (a == b32);
+}
+
+void
+unary_minus_32 (void)
+{
+ decimal32 a;
+
+ a = -a32; VERIFY (a == b32);
+ a = -b32; VERIFY (a == a32);
+}
+
+void
+unary_plus_64 (void)
+{
+ decimal64 a;
+
+ a = +a64; VERIFY (a == a64);
+ a = +b64; VERIFY (a == b64);
+}
+
+void
+unary_minus_64 (void)
+{
+ decimal64 a;
+
+ a = -a64; VERIFY (a == b64);
+ a = -b64; VERIFY (a == a64);
+}
+
+void
+unary_plus_128 (void)
+{
+ decimal128 a;
+
+ a = +a128; VERIFY (a == a128);
+ a = +b128; VERIFY (a == b128);
+}
+
+void
+unary_minus_128 (void)
+{
+ decimal128 a;
+
+ a = -a128; VERIFY (a == b128);
+ a = -b128; VERIFY (a == a128);
+}
+
+int main ()
+{
+ unary_plus_32 ();
+ unary_minus_32 ();
+ unary_plus_64 ();
+ unary_minus_64 ();
+ unary_plus_128 ();
+ unary_minus_128 ();
+}
diff --git a/libstdc++-v3/testsuite/ext/profile/all.cc b/libstdc++-v3/testsuite/ext/profile/all.cc
new file mode 100644
index 00000000000..0a1f9796208
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/profile/all.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE" }
+// { dg-do compile }
+
+// -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <map>
+#include <vector>
+#include <unordered_map>
+
+using std::map;
+using std::vector;
+using std::unordered_map;
+
+struct dumb_hash {
+ size_t operator()(int x) const {return 0;}
+ size_t operator()(int x, int y) const {return x == y;}
+};
+
+int main() {
+ map<int, int> m_to_umap;
+ vector<int> v_to_list;
+ unordered_map<int, int> um_too_small;
+ unordered_map<int, int> um_too_large(1000000);
+ unordered_map<int, int, dumb_hash, dumb_hash> um_dumb_hash;
+
+ for (int i = 0; i < 10000; ++i) {
+ m_to_umap[i] = i;
+ v_to_list.insert(v_to_list.begin(), i);
+ um_too_small[i] = i;
+ um_too_small[i] = i;
+ um_dumb_hash[i] = i;
+ }
+}
diff --git a/libstdc++-v3/testsuite/ext/profile/mh.cc b/libstdc++-v3/testsuite/ext/profile/mh.cc
new file mode 100644
index 00000000000..44a667c0442
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/profile/mh.cc
@@ -0,0 +1,66 @@
+// { dg-options "-D_GLIBCXX_PROFILE" }
+// { dg-do compile { target *-*-linux* } }
+
+// -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <stdio.h>
+#include <malloc.h>
+#include <vector>
+
+using std::vector;
+
+static void my_init_hook (void);
+static void *my_malloc_hook (size_t, const void *);
+typedef void* (*malloc_hook) (size_t, const void *);
+
+malloc_hook old_malloc_hook;
+
+void (*__malloc_initialize_hook) (void) = my_init_hook;
+
+static void
+my_init_hook (void)
+{
+ old_malloc_hook = __malloc_hook;
+ __malloc_hook = my_malloc_hook;
+}
+
+static void *
+my_malloc_hook (size_t size, const void *caller)
+{
+ void *result;
+ __malloc_hook = old_malloc_hook;
+ result = malloc (size);
+ old_malloc_hook = __malloc_hook;
+
+ // With _GLIBCXX_PROFILE, the instrumentation of the vector constructor
+ // will call back into malloc.
+ vector<int> v;
+
+ __malloc_hook = my_malloc_hook;
+ return result;
+}
+
+
+int main()
+{
+ int* test = (int*) malloc(sizeof(int));
+ *test = 1;
+ return *test;
+}
diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
new file mode 100644
index 00000000000..c8bcf720e1d
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions.cc
@@ -0,0 +1,26 @@
+// { dg-options "-D_GLIBCXX_DEBUG -D_GLIBCXX_PROFILE" }
+// { dg-do compile }
+
+// -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 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 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <vector>
+
+// { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 166 }
+// { dg-excess-errors "In file included from" }
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index 1d9af09a3a6..60e9b78fdba 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -80,15 +80,6 @@ proc dg-require-time { args } {
return
}
-proc dg-require-rvalref { args } {
- if { ![ check_v3_target_rvalref ] } {
- upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
- }
- return
-}
-
proc dg-require-cstdint { args } {
if { ![ check_v3_target_cstdint ] } {
upvar dg-do-what dg-do-what
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 05a9b5db860..c71991afc90 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -805,61 +805,6 @@ proc check_v3_target_time { } {
return $et_time_saved
}
-proc check_v3_target_rvalref { } {
- global et_rvalref_saved
- global et_rvalref_target_name
- global tool
-
- if { ![info exists et_rvalref_target_name] } {
- set et_rvalref_target_name ""
- }
-
- # If the target has changed since we set the cached value, clear it.
- set current_target [current_target_name]
- if { $current_target != $et_rvalref_target_name } {
- verbose "check_v3_target_rvalref: `$et_rvalref_target_name'" 2
- set et_rvalref_target_name $current_target
- if [info exists et_rvalref_saved] {
- verbose "check_v3_target_rvalref: removing cached result" 2
- unset et_rvalref_saved
- }
- }
-
- if [info exists et_rvalref_saved] {
- verbose "check_v3_target_rvalref: using cached result" 2
- } else {
- set et_rvalref_saved 0
-
- # Set up and compile a C++ test program that tries to use
- # the library components of rval references
- set src rvalref[pid].cc
- set exe rvalref[pid].x
-
- set f [open $src "w"]
- puts $f "#include <iterator>"
- puts $f "#include <utility>"
- puts $f "using std::move;"
- puts $f "using std::identity;"
- puts $f "using std::forward;"
- puts $f "using std::move_iterator;"
- puts $f "using std::make_move_iterator;"
- close $f
-
- set lines [v3_target_compile $src $exe executable ""]
- file delete $src
-
- if [string match "" $lines] {
- # No error message, compilation succeeded.
- verbose "check_v3_target_rvalref: compilation succeeded" 2
- remote_file build delete $exe
- set et_rvalref_saved 1
- } else {
- verbose "check_v3_target_rvalref: compilation failed" 2
- }
- }
- return $et_rvalref_saved
-}
-
proc check_v3_target_namedlocale { } {
global et_namedlocale_saved
global et_namedlocale_target_name
diff --git a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
index fa3d087ddac..ae339496cda 100644
--- a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
+++ b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
@@ -58,6 +58,7 @@ if {[info exists tests_file] && [file exists $tests_file]} {
lappend subdirs "$srcdir/ext"
lappend subdirs "$srcdir/performance"
lappend subdirs "$srcdir/tr1"
+ lappend subdirs "$srcdir/decimal"
verbose "subdirs are $subdirs"
# Find all the tests.